summaryrefslogtreecommitdiff
path: root/Zend/tests/bug41075.phpt
blob: 0751cbd6904c5c7ece5f0841e9acf308b40d3a22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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