]> granicus.if.org Git - php/commitdiff
- Fix test
authorMarcus Boerger <helly@php.net>
Sun, 26 Feb 2006 16:40:01 +0000 (16:40 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 26 Feb 2006 16:40:01 +0000 (16:40 +0000)
ext/simplexml/tests/bug35785.phpt

index 7075cb4e1bdf781613a15ca82283a7ea6cb2cf5f..fb3cea231f40b4ec31e0daea94d47309babe5c13 100755 (executable)
@@ -4,7 +4,13 @@ Bug #35785 (SimpleXML memory read error)
 <?php
 
 $xml = simplexml_load_string("<root></root>");
-$count = count($xml->posts);
+$xml->bla->posts->name = "FooBar";
+echo $xml->asXML();
+
+echo "===FAIL===\n";
+
+$xml = simplexml_load_string("<root></root>");
+$count = count($xml->bla->posts);
 var_dump($count);
 $xml->bla->posts[++$count]->name = "FooBar";
 echo $xml->asXML();
@@ -12,13 +18,9 @@ echo $xml->asXML();
 ===DONE===
 <?php exit(0); __halt_compiler(); ?>
 --EXPECTF--
+<?xml version="1.0"?>
+<root><bla><posts><name>FooBar</name></posts></bla></root>
+===FAIL===
 int(0)
 
-Notice: Undefined index:  name in %sbug35785.php on line %d
-
-Strict Standards: Creating default object from empty value in %sbug35785.php on line %d
-
-Warning: Attempt to assign property of non-object in %sbug35785.php on line %d
-<?xml version="1.0"?>
-<root/>
-===DONE===
+Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sext/simplexml/tests/bug35785.php on line %d