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

前端 未结 5 767
天命终不由人
天命终不由人 2021-01-30 03:37

I am facing these errors while accessing Magento folder from XAMPP (localhost/magento):

Fatal error: Uncaught Error: Function name must be a string in C

5条回答
  •  太阳男子
    2021-01-30 03:57

    Its due to PHP7

    It's not recommended to edit the core file. We will override it.

    Copy this file app/code/core/Mage/Core/Model/Layout.php into app/code/local/Mage/Core/Model/Layout.php

    Change code in app/code/local/Mage/Core/Model/Layout.php file (line # 555)

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

    To:

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

提交回复
热议问题