When i run my Magento 1.9 CE website on new php version(7.0.4) it start giving me error
Array to string conversion in /var/www/bigliving.local/public_html/app/code/core/Mage/Core/Model/Layout.php on line 555
It happens because in PHP 7 you need to clarify that you are going to call the $callback variable as a method (function). So, the original line of the code looks like the following (file app/code/core/Mage/Core/Model/Layout.php):
$out .= $this->getBlock($callback[0])->$callback[1]();
In order to make it work on the latest PHP version we need to replace this piece of code by this one:
$out .= $this->getBlock($callback[0])->{$callback[1]}();
Refer this blog for further information.
Comments
Post a Comment