php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39007 Crash while writing to nonexistent element
Submitted: 2006-10-01 10:39 UTC Modified: 2006-10-01 15:17 UTC
From: ladislav dot prosek at matfyz dot cz Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.1.6 OS: Windows XP Pro SP2
Private report: No CVE-ID: None
 [2006-10-01 10:39 UTC] ladislav dot prosek at matfyz dot cz
Description:
------------
The following piece of code crashes PHP CLI.

Reproduce code:
---------------
<?
  $x = new SimpleXMLElement("<root/>");
  $y = $x->whatever;
  $y->z["a"] = "b";
?>


Expected result:
----------------
You decide ;)

Actual result:
--------------
* CRASH *

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-01 14:01 UTC] bjori@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Can't reproduce
 [2006-10-01 14:20 UTC] ladislav dot prosek at matfyz dot cz
Works OK with the snapshot. The "Node no longer exists" warning seems quite appropriate. Thanks and sorry for reporting something that is already fixed.
 [2006-10-01 15:17 UTC] johannes@php.net
Already fixed -> report was bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 07:01:34 2024 UTC