engineyard / engineyard/magento-ce-1.8

Uncaught Error: Function name must be a string in /var/www/html/app/code/core/Mage/Core/Model/Layout.php

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
4
Forks
15
PR merge metrics
No merged PRs in 30d

Description

This error was easy to fix because the problem was in the following line:

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

Instead it should be:

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

Source: https://stackoverflow.com/questions/35611696/fatal-error-uncaught-error-function-name-must-be-a-string-in-c-xampp-htdocs-e

Contributor guide

No contributing guide indexed for this repository

Research direction

Open app/code/core/Mage/Core/Model/Layout.php and inspect the callback invocation shown in the issue. Verify the PHP error and the proposed invocation behavior, then run the relevant Magento request or test to confirm that the layout renders without the function-name error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.