#42070 [Opn->Fbk]: Using combined operators on unset values in object's array causes crash

From: Date: Sun, 22 Jul 2007 21:44:38 +0000
Subject: #42070 [Opn->Fbk]: Using combined operators on unset values in object's array causes crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115319@lists.php.net to get a copy of this message
ID: 42070 Updated by: jani@php.net Reported By: michiel at worthit dot nl -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Windows Vista Business PHP Version: 5.2.3 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: ------------------------------------------------------------------------ [2007-07-22 16:30:48] michiel at worthit dot nl Description: ------------ Using a combined operator on an array within an object causes apache to crash. Assigning the object's property to a temporary variable ($someArray = $bar->someArray) and then working with $someArray works as a workaround. Also this doesn't only apply to just arrays, $foo->bar->value += 1; crashes apache as well. Furthermore, this behaviour is also witnessed under version 5.2.2 and could not be reproduced on Gentoo Linux 2.6.19. Reproduce code: --------------- // Uncomment any lines below to achieve the same result // $bar = new stdClass(); // $bar->someArray = array(); $bar->someArray[0] += 1; Expected result: ---------------- $bar to be an object, with the property $someArray to be an array containing the int value 1 at index 0 : object(stdClass)#1 (1) { ["someArray"]=> array(1) { [0]=> int(1) } } Actual result: -------------- Apache crashes, independent of combined operator or index. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42070&edit=1

« previous php.bugs (#115319) next »