Magento error - fatal error uncaught error function name must be a string in ...Layout.php on line 555

If you are experiencing, a similar error to below:

Fatal error: Uncaught Error: Function name must be a string in C:\xampp\htdocs\acf\app\code\core\Mage\Core\Model\Layout.php:555 Stack trace: #0


This happens because in you are running Magneto 1.9 in PHP 7. To solve the error you need to clarify that you are going to call the $callback variable as a method (function).

Navigate to the original line of the code in file:


Find the line ~line 555

$out .= $this->getBlock($callback[0])->$callback[1]();


And replace it with

$out .= $this->getBlock($callback[0])->{$callback[1]}();


Print   Email

Related Articles