1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 04:02:19 +02:00

add new test

This commit is contained in:
Antony Dovgal
2007-04-13 13:37:17 +00:00
parent 61a3b763d8
commit d3df2eb468

31
Zend/tests/bug41075.phpt Normal file
View File

@@ -0,0 +1,31 @@
--TEST--
Bug #41075(memleak when creating default object caused exception)
--FILE--
<?php
function err($errno, $errstr, $errfile, $errline)
{
throw new Exception($errstr);
}
set_error_handler("err");
class test {
function foo() {
$var = $this->blah->prop = "string";
var_dump($this->blah);
}
}
$t = new test;
try {
$t->foo();
} catch (Exception $e) {
var_dump($e->getMessage());
}
echo "Done\n";
?>
--EXPECTF--
string(40) "Creating default object from empty value"
Done