cvs: ZendEngine2(PHP_5_0) / zend_compile.c /tests bug29104.phpt php-src NEWS

From: Date: Wed, 27 Apr 2005 14:30:33 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_compile.c /tests bug29104.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3603@lists.php.net to get a copy of this message
dmitry Wed Apr 27 10:30:33 2005 EDT Added files: (Branch: PHP_5_0) /ZendEngine2/tests bug29104.phpt Modified files: /php-src NEWS /ZendEngine2 zend_compile.c Log: Fixed bug #29104 (Function declaration in method doesn't work) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.352&r2=1.1760.2.353&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.352 php-src/NEWS:1.1760.2.353 --- php-src/NEWS:1.1760.2.352 Wed Apr 27 08:16:44 2005 +++ php-src/NEWS Wed Apr 27 10:30:31 2005 @@ -60,6 +60,7 @@ (Dmitry) - Fixed bug #29944 (Function defined in switch, crashes). (Dmitry) - Fixed bug #29583 (crash when echoing a COM object). (M.Sisolak, Wez) +- Fixed bug #29104 (Function declaration in method doesn't work). (Dmitry) - Fixed bug #28839 (SIGSEGV in interactive mode (php -a)). (kameshj at fastmail dot fm) http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.567.2.16&r2=1.567.2.17&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.567.2.16 ZendEngine2/zend_compile.c:1.567.2.17 --- ZendEngine2/zend_compile.c:1.567.2.16 Mon Apr 25 05:58:06 2005 +++ ZendEngine2/zend_compile.c Wed Apr 27 10:30:32 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.567.2.16 2005/04/25 09:58:06 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.567.2.17 2005/04/27 14:30:32 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -965,7 +965,7 @@ op_array.fn_flags = fn_flags; op_array.pass_rest_by_reference = 0; - op_array.scope = CG(active_class_entry); + op_array.scope = is_method?CG(active_class_entry):NULL; op_array.prototype = NULL; op_array.line_start = zend_get_compiled_lineno(TSRMLS_C); http://cvs.php.net/co.php/ZendEngine2/tests/bug29104.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug29104.phpt +++ ZendEngine2/tests/bug29104.phpt --TEST-- Bug #29104 Function declaration in method doesn't work --FILE-- <?php class A { function g() { echo "function g - begin\n"; function f() { echo "function f\n"; } echo "function g - end\n"; } } $a = new A; $a->g(); f(); ?> --EXPECT-- function g - begin function g - end function f

« previous php.zend-engine.cvs (#3603) next »