File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug41075.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: --TEST--
    2: Bug #41075 (memleak when creating default object caused exception)
    3: --FILE--
    4: <?php
    5: 
    6: function err($errno, $errstr, $errfile, $errline)
    7: {
    8: 	    throw new Exception($errstr);
    9: }
   10: 
   11: set_error_handler("err");
   12: 
   13: class test {
   14:     function foo() {
   15:         $var = $this->blah->prop = "string";
   16:         var_dump($this->blah);
   17:     }
   18: }
   19: 
   20: $t = new test;
   21: try {
   22:     $t->foo();
   23: } catch (Exception $e) {
   24:     var_dump($e->getMessage());
   25: }
   26: 
   27: echo "Done\n";
   28: ?>
   29: --EXPECTF--	
   30: string(40) "Creating default object from empty value"
   31: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>