From: Marcus Boerger Date: Sun, 26 Feb 2006 16:40:01 +0000 (+0000) Subject: - Fix test X-Git-Tag: RELEASE_1_2~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3dd6bb16aab2946d6e2f42c406726b8d411def96;p=php - Fix test --- diff --git a/ext/simplexml/tests/bug35785.phpt b/ext/simplexml/tests/bug35785.phpt index 7075cb4e1b..fb3cea231f 100755 --- a/ext/simplexml/tests/bug35785.phpt +++ b/ext/simplexml/tests/bug35785.phpt @@ -4,7 +4,13 @@ Bug #35785 (SimpleXML memory read error) "); -$count = count($xml->posts); +$xml->bla->posts->name = "FooBar"; +echo $xml->asXML(); + +echo "===FAIL===\n"; + +$xml = simplexml_load_string(""); +$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=== --EXPECTF-- + +FooBar +===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 - - -===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