[RSS Feed/News] Error when creating attachment key for profile post if profile_user_id context is not correctly provided

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Looks like a check is missing because it's not something you can encounter under normal usage

PHP:

Code:
    protected function getUserFromContext(array $context)
    {
        $em = \XF::em();
        if (!empty($context['profile_post_id']))
        {
            /** @var \XF\Entity\ProfilePost $profilePost */
            $profilePost = $em->find('XF:ProfilePost', intval($context['profile_post_id']), ['ProfileUser']);
            if (!$profilePost || !$profilePost->canView() ||...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom