#29543 [Opn->Fbk]: Using an object for an array key can crash apache rather than giving a warning
| From: | tony2001@php.net | Date: | Sat, 04 Sep 2004 15:48:10 +0000 |
| Subject: | #29543 [Opn->Fbk]: Using an object for an array key can crash apache rather than giving a warning | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65721@lists.php.net to get a copy of this message | ||
ID: 29543
Updated by: tony2001@php.net
Reported By: rainsford at acer dot edu dot au
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: Windows XP
PHP Version: 5.0.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Gives the warning for me and doesn't crash.
Please, try the latest snapshot.
Previous Comments:
------------------------------------------------------------------------
[2004-08-06 04:28:30] rainsford at acer dot edu dot au
Description:
------------
Using += or -= etc. operator to assign to an array using an object for
a key crashes apache rather than giving an Illegal Offset Type warning.
++, -- and =n don't crash apache.
FYI, I Installed the PHP windows binaries
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
Reproduce code:
---------------
<?php
class Foo {
}
$foo = new Foo();
$collection = array();
$collection[$foo] += 1; // crashes Apache 2.0.49 on Windows XP
?>
Expected result:
----------------
Warning: Illegal offset type in C:\work\msat\src\test\crashApache.php
on line 8
Actual result:
--------------
Apache crashes:
from Apache error log:
[Fri Aug 06 12:03:19 2004] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
from Event Viewer:
Faulting application Apache.exe, version 2.0.49.0, faulting module
unknown,
version 0.0.0.0, fault address 0x00000000.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29543&edit=1