contao/issues — Issue #624: replaceInsertTags HOOK evaluated twice
Author: importer
Created: 2011-11-24 15:42:21+00:00
State: open
Labels: Defect, framework

Hi there,

following the result of bug #161, it seems that replaceInsertTags hooks are evaluated twice (we're working with 2.6.4 but it's still in the newest 2.6.7):

import($callbackr0);
$varValue = $this->$callbackr0->$callbackr1($strTag);

if ($varValue !== false)
{
$arrCache[$strTag] = $this->$callbackr0->$callbackr1($strTag);
break;
}
}
?>

Could this be reduced to the following:

import($callbackr0);
$varValue = $this->$callbackr0->$callbackr1($strTag);

if ($varValue !== false)
{
$arrCache[$strTag] = $varValue;
break;
}
}
?>

Some custom insert tags might not return the same value twice (in our case we have some DB interaction going on inside the module which has a negative effect on performance if called twice).

cheers,
alex

--- _Originally created by ahouben on March 27th, 2009, at 04:01pm (ID 624)_