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.