php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70338 Variable incompatibility with PHP 5.6
Submitted: 2015-08-24 11:26 UTC Modified: 2015-08-24 12:19 UTC
From: craig_carnell at hotmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 7.0.0RC1 OS: OS X 10.10.5
Private report: No CVE-ID: None
 [2015-08-24 11:26 UTC] craig_carnell at hotmail dot com
Description:
------------
There exist an incompatibility with previous working code in PHP 5.6 in Magento CE 1.9.2.1

Test script:
---------------
The following code works on PHP 5.6:

app/code/core/Mage/Core/Model/Layout.php on line 555

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

It has to be modified to look like this:

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

Expected result:
----------------
Without the change, we get an exception generated


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-24 12:19 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Package: Session related +Package: Scripting Engine problem
 [2015-08-24 12:19 UTC] cmb@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

That is because of the uniform variable syntax implemented as of
PHP 7, see <https://wiki.php.net/rfc/uniform_variable_syntax>.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 00:01:31 2024 UTC