]> granicus.if.org Git - php/commitdiff
remove the parser errors here, so they accurately reflect what should happen.
authorSterling Hughes <sterling@php.net>
Sat, 17 Jan 2004 16:39:52 +0000 (16:39 +0000)
committerSterling Hughes <sterling@php.net>
Sat, 17 Jan 2004 16:39:52 +0000 (16:39 +0000)
ext/simplexml/tests/profile06.phpt
ext/simplexml/tests/profile07.phpt
ext/simplexml/tests/profile10.phpt

index 4e9421a2a35fc49167d2bb448d8aeca3add3b433..16d52200c44ab13c8a38d45c7d452d0fe72f7ecc 100644 (file)
@@ -11,7 +11,8 @@ $root = simplexml_load_string('<?xml version="1.0"?>
 </root>
 ');
 
-echo $root->child->attributes('reserved')['attribute'];
+$attr = $root->child->attributes('reserved');
+echo $attr['attribute'];
 echo "\n---Done---\n";
 ?>
 --EXPECT--
index 51ffb8efb32ab731d23e04215fd12a98e26b0303..9972f79973d73f9fcb1f5f754bcdb1ff21d6fb89 100644 (file)
@@ -13,8 +13,11 @@ $root = simplexml_load_string('<?xml version="1.0"?>
 
 $root->register_ns('myns', 'reserved-ns');
 
-echo $root->child->attributes('reserved')['attribute'];
-echo $root->child->attributes('myns')['attribute'];
+$rsattr = $root->child->attributes('reserved');
+$myattr = $root->child->attributes('myns');
+
+echo $rsattr['attribute'];
+echo $myattr['attribute'];
 echo "\n---Done---\n";
 ?>
 --EXPECT--
index 06beee851ef938f642a5d06db98270e41a35349f..4c62aef43ee7f7835ba4b5344beaff4500439fab 100644 (file)
@@ -11,9 +11,12 @@ $root = simplexml_load_string('<?xml version="1.0"?>
 </root>
 ');
 
-echo $root->child->attributes('reserved')['attribute'];
+$rsattr = $root->child->attributes('reserved');
+$spattr = $root->child->attributes('special');
+
+echo $rsattr['attribute'];
 echo "\n";
-echo $root->child->attributes('special')['attribute'];
+echo $spattr['attribute'];
 foreach ($root->child['attribute'] as $attr) {
        echo "$attr\n";
 }