Bug #69845 [NEW]: ArrayObject with ARRAY_AS_PROPS broken
From: dmifedorenko at gmail dot com
Operating system: Linux vm 3.13.0-37-generic #64-U
PHP version: 7.0Git-2015-06-16 (Git)
Package: Class/Object related
Bug Type: Bug
Bug description:ArrayObject with ARRAY_AS_PROPS broken
Description:
------------
Seems like ArrayObject with ARRAY_AS_PROPS implementation broken.
After second call of constructor I cant get access to the array
property.
Test script:
---------------
for ($i = 0; $i<2; $i++) {
$data = new \ArrayObject(new stdClass(), ArrayObject::ARRAY_AS_PROPS);
$data->itemType = 'bulletin';
var_dump(!is_null($data['itemType']));
}
exit;
Expected result:
----------------
bool(true) bool(true)
Actual result:
--------------
bool(true) bool(false)
--
Edit bug report at https://bugs.php.net/bug.php?id=69845&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69845&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69845&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69845&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69845&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69845&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69845&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69845&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69845&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69845&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69845&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69845&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69845&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69845&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69845&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69845&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69845&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69845&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69845&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69845&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69845&r=mysqlcfg
Thread (2 messages)
- dmifedorenko at gmail dot com