Not a bug $null in XenForo_LikeHandler_Post

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 :)
 
Just took a look and there are plenty of functions working with $null. It's rather late here tomorrow I try to understand it :)
 
$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.
 
Top Bottom