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

gigipmc

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

PHP:
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..
 
Back
Top Bottom