Tests for bug #61165

This commit is contained in:
Xinchen Hui 2012-02-25 03:12:54 +00:00
parent 911330e62c
commit f86d90d27b

30
Zend/tests/bug61165.phpt Normal file
View File

@ -0,0 +1,30 @@
--TEST--
Bug #61165 (Segfault - strip_tags())
--XFAILD--
#61165 doesn't fix yet
--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);
echo "$i\n";
}
--EXPECTF--
object(T)#%d (1) {
["_this"]=>
*RECURSION*
}