php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69845 ArrayObject with ARRAY_AS_PROPS broken
Submitted: 2015-06-16 05:22 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: dmifedorenko at gmail dot com Assigned:
Status: Closed Package: Class/Object related
PHP Version: 7.0Git-2015-06-16 (Git) OS: Linux vm 3.13.0-37-generic #64-U
Private report: No CVE-ID: None
 [2015-06-16 05:22 UTC] dmifedorenko at gmail dot com
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) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-16 07:54 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6ae375db31605e13c05c4c9b985898f8e3e4b61c
Log: Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken)
 [2015-06-16 07:54 UTC] dmitry@php.net
-Status: Open +Status: Closed
 [2015-06-23 18:04 UTC] ab@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6ae375db31605e13c05c4c9b985898f8e3e4b61c
Log: Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken)
 [2016-07-20 11:38 UTC] davey@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6ae375db31605e13c05c4c9b985898f8e3e4b61c
Log: Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken)
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC