cvs: php-src(PHP_5_1) /ext/simplexml/tests bug35785.phpt
| From: | Marcus Boerger | Date: | Fri, 23 Dec 2005 20:26:41 +0000 |
| Subject: | cvs: php-src(PHP_5_1) /ext/simplexml/tests bug35785.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-36188@lists.php.net to get a copy of this message | ||
helly Fri Dec 23 20:26:41 2005 EDT
Added files: (Branch: PHP_5_1)
/php-src/ext/simplexml/tests bug35785.phpt
Log:
- MFH Add new test
http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/tests/bug35785.phpt?view=markup&rev=1.1
Index: php-src/ext/simplexml/tests/bug35785.phpt
+++ php-src/ext/simplexml/tests/bug35785.phpt
--TEST--
Bug #35785 (SimpleXML memory read error)
--FILE--
<?php
$options["database"] = "xmldatabase";
$xml = simplexml_load_string("<root></root>");
$count = count($xml->posts) + 1;
$xml->bla->posts[$count]->name = $_POST["name"];
echo $xml->asXML();
?>
===DONE===
<?php exit(0); __halt_compiler(); ?>
--EXPECTF--
Notice: Undefined index: name in %sbug35785.phpt on line %d
Strict Standards: Creating default object from empty value in %sbug35785.phpt on line %d
Warning: Attempt to assign property of non-object in %sbug35785.phpt on line %d
<?xml version="1.0"?>
<root/>