• We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Bug Database Error

puertoblack2003

New Member
Joined
Apr 17, 2021
Messages
5
Code:
ErrorException: [E_NOTICE] Trying to get property 'user_id' of non-object src\addons\XFA\LikeReplyViewAttachment\XF\Entity\Attachment.php:47
   Generated by: Unknown account Apr 17, 2021 at 2:32 PM
Code:
Stack trace

#0 src\addons\XFA\LikeReplyViewAttachment\XF\Entity\Attachment.php(47): XF::handlePhpError(8, '[E_NOTICE] Tryi...', 'A:\\Abyss Web Se...', 47, Array)
#1 src\addons\XFA\LikeReplyViewAttachment\XF\Entity\Attachment.php(25): XFA\LikeReplyViewAttachment\XF\Entity\Attachment->canViewLrva()
#2 src\addons\XF301VB\Pub\Controller\Redirect.php(127): XFA\LikeReplyViewAttachment\XF\Entity\Attachment->canView()
#3 src\addons\XF301VB\Pub\Controller\Redirect.php(72): XF301VB\Pub\Controller\Redirect->redirectContent(Object(XF\Mvc\ParameterBag), 'attachment', 'XF:Attachment', 'attachments')
#4 src\XF\Mvc\Dispatcher.php(350): XF301VB\Pub\Controller\Redirect->actionAttachment(Object(XF\Mvc\ParameterBag))
#5 src\XF\Mvc\Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF301VB:Redirec...', 'Attachment', Object(XF\Mvc\RouteMatch), Object(XF301VB\Pub\Controller\Redirect), NULL)
#6 src\XF\Mvc\Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF301VB\Pub\Controller\Redirect), NULL)
#7 src\XF\Mvc\Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src\XF\App.php(2326): XF\Mvc\Dispatcher->run()
#9 src\XF.php(488): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}
Code:
Request state

array(4) {
  ["url"] => string(82) "/attachment.php?s=8d1d722997d6c69a84abe1a098ed1d14&attachmentid=11618&d=1206760225"
  ["referrer"] => bool(false)
  ["_GET"] => array(3) {
    ["s"] => string(32) "8d1d722997d6c69a84abe1a098ed1d14"
    ["attachmentid"] => string(5) "11618"
    ["d"] => string(10) "1206760225"
  }
  ["_POST"] => array(0) {
  }
}
 

Fredxd

Administrator
Staff member
Joined
Nov 14, 2015
Messages
1,878
Hi
Sorry for delay...

Can you try something and tell me if this fix your problem ?

Edit this file: src/addons/XFA/LikeReplyViewAttachment/XF/Entity/Attachment.php

Find

PHP:
if($this->Data->user_id === $visitor->user_id) {
            return true;
         }
Replace by

PHP:
if($this->Data && $this->Data->user_id === $visitor->user_id) {
            return true;
         }
 
  • Like
Reactions: puertoblack2003

puertoblack2003

New Member
Joined
Apr 17, 2021
Messages
5
Hi
Sorry for delay...

Can you try something and tell me if this fix your problem ?

Edit this file: src/addons/XFA/LikeReplyViewAttachment/XF/Entity/Attachment.php

Find

PHP:
if($this->Data->user_id === $visitor->user_id) {
            return true;
         }
Replace by

PHP:
if($this->Data && $this->Data->user_id === $visitor->user_id) {
            return true;
         }

thank you that worked. next release can you add option to change to like or reply instead of an image? thanks