Bug #69863 [NEW]: __get method is not calling

From: Date: Wed, 17 Jun 2015 15:58:58 +0000
Subject: Bug #69863 [NEW]: __get method is not calling
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193618@lists.php.net to get a copy of this message
From: tugrultopuz at gmail dot com Operating system: PHP version: 5.4.42 Package: SPL related Bug Type: Bug Bug description:__get method is not calling Description: ------------ https://github.com/php/php-src/blob/PHP-5.4.42/ext/spl/spl_array.c#L332 https://github.com/php/php-src/blob/PHP-5.4.42/ext/spl/spl_array.c#L360 Above links are pointed to bug. Looks like there is no fallback handler for BP_VAR_RW state and not triggering __get magic method. Test script: --------------- https://gist.github.com/tugrul/14a621181a2e96ac9d81 Expected result: ---------------- PHP Notice: Undefined index: foo in /srv/www/phptest/arrayobject.php on line 26 PHP Stack trace: PHP 1. {main}() /srv/www/phptest/arrayobject.php:0 PHP Warning: Creating default object from empty value in /srv/www/phptest/arrayobject.php on line 26 PHP Stack trace: PHP 1. {main}() /srv/www/phptest/arrayobject.php:0 Actual result: -------------- class OtherArrayObject#2 (1) { private $storage => array(1) { 'foo' => class OtherArrayObject#3 (1) { private $storage => array(1) { ... } } } } -- Edit bug report at https://bugs.php.net/bug.php?id=69863&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69863&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69863&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69863&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69863&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69863&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69863&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69863&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69863&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69863&r=support Expected behavior: https://bugs.php.net/fix.php?id=69863&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69863&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69863&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69863&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69863&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69863&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69863&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69863&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69863&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69863&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69863&r=mysqlcfg

« previous php.bugs (#193618) next »