contao/import — Issue #161: expecting problem with replaceInsertTags HOOK
Author: aschempp
Created: 2011-11-29 15:47:28+00:00
State: open
Labels: backend, Defect

The new replaceInsertTags hook is great, but I am expecting problems with it. Here's the code:

```
// HOOK: pass unknown tags to callback functions
default:
if (array_key_exists('replaceInsertTags', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['replaceInsertTags']))
{
foreach ($GLOBALS['TL_HOOKS']['replaceInsertTags'] as $callback)
{
$this->import($callbackr0);
$arrCache[$strTag] = $this->$callbackr0->$callbackr1($strTag);
}
}
break;
```

If you have multiple hooks registered, I expect the last hook to replace everything passed before... but chances are high the first hook returns the expected value. we should check if return value is fals or null, and abort _foreach_ if not.

--- _Originally created on October 4th, 2008, at 03:06pm (ID 161)_