]> granicus.if.org Git - php/commitdiff
- Add new test
authorMarcus Boerger <helly@php.net>
Tue, 23 May 2006 21:56:36 +0000 (21:56 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 23 May 2006 21:56:36 +0000 (21:56 +0000)
ext/simplexml/tests/bug37565.phpt [new file with mode: 0755]

diff --git a/ext/simplexml/tests/bug37565.phpt b/ext/simplexml/tests/bug37565.phpt
new file mode 100755 (executable)
index 0000000..95f9795
--- /dev/null
@@ -0,0 +1,25 @@
+--TEST--
+Bug #37565 Using reflection::export with simplexml causing a crash 
+--FILE--
+<?php
+
+class Setting extends ReflectionObject
+{
+}
+
+Reflection::export(simplexml_load_string('<test/>', 'Setting'));
+
+Reflection::export(simplexml_load_file('data:,<test/>', 'Setting'));
+
+?>
+===DONE===
+--EXPECTF--
+
+Warning: simplexml_load_string() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given in %sbug37565.php on line %d
+
+Warning: Reflection::export() expects parameter 1 to be Reflector, null given in %sbug37565.php on line %d
+
+Warning: simplexml_load_file() expects parameter 2 to be a class name derived from SimpleXMLElement, 'Setting' given in %sbug37565.php on line %d
+
+Warning: Reflection::export() expects parameter 1 to be Reflector, null given in %sbug37565.php on line %d
+===DONE===