[PHP-BUG] Bug #71170 [NEW]: function name as array not working
[email protected] ("dallas at ekkysoftware dot com")
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
From: dallas at ekkysoftware dot com
Operating system: debian 8
PHP version: 7.0.1
Package: *General Issues
Bug Type: Bug
Bug description:function name as array not working
Description:
------------
Function name as an array element not working even though it's a string
Test script:
---------------
if(false){
//In Magento this doesn't work:-
$out .= $this->getBlock($callback[0])->$callback[1]();
//While this does
$str = $callback[1];
$out .= $this->getBlock($callback[0])->$str();
}
Expected result:
----------------
function is to be called
Actual result:
--------------
Throws exception:-
[Sun Dec 20 10:09:53.861694 2015] [:error] [pid 3622:tid
140406412060416] [client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: PHP message: PHP Fatal error:
Uncaught Error: Function name must be a string in
/var/www/www.popcherry.com.au/pcmago14/source/app/code/core/Mage/Core/Model/Layout.php:555
[Sun Dec 20 10:09:53.861764 2015] [:error] [pid 3622:tid
140406412060416] [client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: Stack trace:
[Sun Dec 20 10:09:53.861777 2015] [:error] [pid 3622:tid
140406412060416] [client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: #0
/var/www/www.popcherry.com.au/pcmago14/source/app/code/core/Mage/Core/Controller/Varien/Action.php(390):
Mage_Core_Model_Layout->getOutput()
[Sun Dec 20 10:09:53.861786 2015] [:error] [pid 3622:tid
140406412060416] [client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: #1
/var/www/www.popcherry.com.au/pcmago14/source/app/code/core/Mage/Cms/Helper/Page.php(137):
Mage_Core_Controller_Varien_Action->renderLayout()
[Sun Dec 20 10:09:53.861795 2015] [:error] [pid 3622:tid
140406412060416]
[client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: #2
/var/www/www.popcherry.com.au/pcmago14/source/app/code/core/Mage/Cms/Helper/Page.php(52):
Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController),
'home')
[Sun Dec 20 10:09:53.861804 2015] [:error] [pid 3622:tid
140406412060416] [client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: #3
/var/www/www.popcherry.com.au/pcmago14/source/app/code/core/Mage/Cms/controllers/IndexController.php(45):
Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController),
'home')
[Sun Dec 20 10:09:53.861812 2015] [:error] [pid 3622:tid
140406412060416] [client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: #4
/var/www/www.popcherry.com.au/pcmago14/source/app/code/core/Mage/Core/Controller/Varien/Action.php(418):
Mage_Cms_IndexController->indexAction()
[Sun Dec 20 10:09:53.861821 2015] [:error] [pid 3622:tid
140406412060416] [client 110.174.8.215:55270] FastCGI: server
"/opt/php-7.0.1/sbin/php-fpm" stderr: #5
/var/www/www.popcherry.com.au/pcmago14/sou...
--
Edit bug report at https://bugs.php.net/bug.php?id=71170&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71170&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71170&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71170&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71170&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71170&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71170&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71170&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71170&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71170&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71170&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71170&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71170&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71170&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71170&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71170&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71170&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71170&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71170&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71170&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71170&r=mysqlcfg