Magento – Maximum function nesting level , what it means

errormagento-1.9

when i add

    Mage::log($name, null, 'events.log', true);

in the function of dispatchEvent()

public static function dispatchEvent($name, array $data = array())
{
    Mage::log($name, null, 'events.log', true);
    Varien_Profiler::start('DISPATCH EVENT:'.$name);
    $result = self::app()->dispatchEvent($name, $data);
    Varien_Profiler::stop('DISPATCH EVENT:'.$name);
    return $result;
}

the following error i got

( ! ) Fatal error: Maximum function nesting level of '100' reached,
aborting! in
E:\wamp\www\magento\app\code\core\Mage\Core\Model\Abstract.php on line
119

how to avoid this?

Best Answer

You can add following line in your .htacess(located at root of magento) to avoid above error. It about maximum nesting allowed for recursion by xdebug module.

php_value xdebug.max_nesting_level 500

Another solution is to add

 xdebug.max_nesting_level = 500

in your php.ini

Related Topic