2005-12-23 20:26:22 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #35785 (SimpleXML memory read error)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$xml = simplexml_load_string("<root></root>");
|
2006-02-26 15:48:28 +00:00
|
|
|
$count = count($xml->posts);
|
|
|
|
var_dump($count);
|
|
|
|
$xml->bla->posts[++$count]->name = "FooBar";
|
2005-12-23 20:26:22 +00:00
|
|
|
echo $xml->asXML();
|
|
|
|
?>
|
|
|
|
===DONE===
|
|
|
|
<?php exit(0); __halt_compiler(); ?>
|
|
|
|
--EXPECTF--
|
2006-02-26 15:48:28 +00:00
|
|
|
int(0)
|
2005-12-23 20:26:22 +00:00
|
|
|
|
2005-12-23 20:31:39 +00:00
|
|
|
Notice: Undefined index: name in %sbug35785.php on line %d
|
2005-12-23 20:26:22 +00:00
|
|
|
|
2005-12-23 20:31:39 +00:00
|
|
|
Strict Standards: Creating default object from empty value in %sbug35785.php on line %d
|
2005-12-23 20:26:22 +00:00
|
|
|
|
2005-12-23 20:31:39 +00:00
|
|
|
Warning: Attempt to assign property of non-object in %sbug35785.php on line %d
|
2005-12-23 20:26:22 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<root/>
|
2005-12-23 20:31:39 +00:00
|
|
|
===DONE===
|