cvs: ZendEngine2 / zend_compile.c /tests catch.phpt php-src NEWS

From: Date: Thu, 08 Sep 2005 10:32:29 +0000
Subject: cvs: ZendEngine2 / zend_compile.c /tests catch.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4103@lists.php.net to get a copy of this message
dmitry Thu Sep 8 06:32:29 2005 EDT Added files: /ZendEngine2/tests catch.phpt Modified files: /php-src NEWS /ZendEngine2 zend_compile.c Log: catch operator shouldn't call __autoload () too http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2057&r2=1.2058&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2057 php-src/NEWS:1.2058 --- php-src/NEWS:1.2057 Fri Sep 2 03:46:28 2005 +++ php-src/NEWS Thu Sep 8 06:32:16 2005 @@ -2,8 +2,8 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 6.0 - Unicode support. (Andrei, Dmitriy, et al) -- Changed "instanceof" operator, is_a() and is_subclass_of() functions to not - call __autoload(). (Dmitry) +- Changed "instanceof" and "catch" operators, is_a() and is_subclass_of() + functions to not call __autoload(). (Dmitry) - Added optional parameter to http_build_query() to allow specification of string separator. - cURL improvements: (Ilia) http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.661&r2=1.662&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.661 ZendEngine2/zend_compile.c:1.662 --- ZendEngine2/zend_compile.c:1.661 Thu Sep 1 06:55:05 2005 +++ ZendEngine2/zend_compile.c Thu Sep 8 06:32:27 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.661 2005/09/01 10:55:05 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.662 2005/09/08 10:32:27 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -1791,6 +1791,13 @@ long catch_op_number = get_next_op_number(CG(active_op_array)); zend_op *opline; + if (catch_op_number > 0) { + opline = &CG(active_op_array)->opcodes[catch_op_number-1]; + if (opline->opcode == ZEND_FETCH_CLASS) { + opline->extended_value |= ZEND_FETCH_CLASS_NO_AUTOLOAD; + } + } + opline = get_next_op(CG(active_op_array) TSRMLS_CC); opline->opcode = ZEND_CATCH; opline->op1 = *catch_class; http://cvs.php.net/co.php/ZendEngine2/tests/catch.phpt?r=1.1&p=1 Index: ZendEngine2/tests/catch.phpt +++ ZendEngine2/tests/catch.phpt --TEST-- catch shouldn't call __autoload --FILE-- <?php function __autoload($name) { echo("AUTOLOAD '$name'\n"); eval("class $name {}"); } try { } catch (A $e) { } try { throw new Exception(); } catch (B $e) { } catch (Exception $e) { echo "ok\n"; } ?> --EXPECT-- ok

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