• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug $null in XenForo_LikeHandler_Post

Chris D

XenForo developer
Staff member
#2
You may be correct that it isn't intentional and it was meant to be NULL but it isn't technically incorrect.

That variable in canViewPostAndContainer is &$errorPhraseKey = '' and therefore passed by reference so it actually sets $null === '' or whatever error is thrown by the subsequent functions.

But, still, seems unintentional, so good spot :)
 

Marcus

Well-known member
#3
Just took a look and there are plenty of functions working with $null. It's rather late here tomorrow I try to understand it :)
 

sonnb

Well-known member
#4
$errorPhraseKey will be written to $null so it is not a problem here. He does not initial this variable because he does not need to use it.