Not a bug Unnecessary empty() function call in BbCode Base.php

thedude

Well-known member
Licensed customer
Not so much a bug, but just a code cleanup issue.

In library/XenForo/BbCode/Formatter/Base.php, line 1054

PHP:
$noFollow = (empty($rendererStates['noFollowDefault']) ? '' : ' rel="nofollow"');

$rendererStates['noFollowDefault'] is either true/false, so the empty() function surrounding is not needed
 
Yes, empty is perfectly valid even when it exists and basically the same as !isset($x) OR !$x.
 
Back
Top Bottom