XF\Template\Templater::filterReplace() redundant code?

Status
This content is read-only, or is not open for further replies.

gigipmc

Guest
offline
Not a bug but I guess can be cleaned up: XF\Template\Templater::filterReplace() contains the following code:

PHP:

Code:
if (!is_array($from))
{
    $from = [$from => $to];
}

if (!is_array($from))
{
    return $value;
}

How can the 2nd conditional ever come true when the first conditional just made sure $from is an array..

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom