From f018ec9024e1455c13c7acac612a91eea923c936 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 13 Jun 2007 13:38:26 +0000 Subject: Fixed wrong fix for bug #41582 --- ext/simplexml/tests/bug35785.phpt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'ext/simplexml/tests/bug35785.phpt') diff --git a/ext/simplexml/tests/bug35785.phpt b/ext/simplexml/tests/bug35785.phpt index 4156a7c9f3..0e03f07c55 100755 --- a/ext/simplexml/tests/bug35785.phpt +++ b/ext/simplexml/tests/bug35785.phpt @@ -8,13 +8,13 @@ Bug #35785 (SimpleXML memory read error) $xml = simplexml_load_string(""); $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"; +$xml->bla->posts[$count]->name = "FooBar"; +echo $xml->asXML(); +$xml = simplexml_load_string(""); +$xml->bla->posts[]->name = "FooBar"; echo $xml->asXML(); ?> ===DONE=== @@ -22,12 +22,9 @@ echo $xml->asXML(); --EXPECTF-- FooBar -===FAIL=== int(0) - -Notice: Indirect modification of overloaded element of SimpleXMLElement has no effect in %sbug35785.php on line %d - -Strict Standards: Creating default object from empty value in %sbug35785.php on line %d - +FooBar + +FooBar ===DONE=== -- cgit v1.2.1