diff options
| author | Marcus Boerger <helly@php.net> | 2005-12-23 20:26:41 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-12-23 20:26:41 +0000 |
| commit | ad61a18a2e6e28f2177e1ffa57b00726203c1f56 (patch) | |
| tree | 7335c07390ad0393423b45fcc905e5d1a0682bc0 /ext/simplexml/tests | |
| parent | 42f8bef053518331e93c3c6223bc26eea0c91ef6 (diff) | |
| download | php-git-ad61a18a2e6e28f2177e1ffa57b00726203c1f56.tar.gz | |
- MFH Add new test
Diffstat (limited to 'ext/simplexml/tests')
| -rwxr-xr-x | ext/simplexml/tests/bug35785.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/simplexml/tests/bug35785.phpt b/ext/simplexml/tests/bug35785.phpt new file mode 100755 index 0000000000..2c3a54d5d6 --- /dev/null +++ b/ext/simplexml/tests/bug35785.phpt @@ -0,0 +1,22 @@ +--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/> |
