]> granicus.if.org Git - php/commitdiff
merge test to 5.3, and remove xfail since the bug was fixed
authorXinchen Hui <laruence@php.net>
Sat, 25 Feb 2012 05:18:40 +0000 (05:18 +0000)
committerXinchen Hui <laruence@php.net>
Sat, 25 Feb 2012 05:18:40 +0000 (05:18 +0000)
Zend/tests/bug61165.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug61165.phpt b/Zend/tests/bug61165.phpt
new file mode 100644 (file)
index 0000000..478fa00
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+Bug #61165 (Segfault - strip_tags())
+--FILE--
+<?php
+
+$handler = NULL;
+class T {
+    public $_this;
+
+    public function __toString() {
+               global $handler;
+           $handler = $this;
+        $this->_this = $this; // <-- uncoment this
+        return 'A';
+    }
+}
+
+$t = new T;
+for ($i = 0; $i < 3; $i++) {
+    strip_tags($t);
+       strip_tags(new T);
+}
+var_dump($handler);
+--EXPECTF--
+object(T)#%d (1) {
+  ["_this"]=>
+  *RECURSION*
+}