cvs: php-src(PHP_5_1) / NEWS /main main.c /tests/lang bug35176.phpt

From: Date: Tue, 15 Nov 2005 11:13:44 +0000
Subject: cvs: php-src(PHP_5_1) / NEWS /main main.c /tests/lang bug35176.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-35118@lists.php.net to get a copy of this message
dmitry Tue Nov 15 06:13:44 2005 EDT Added files: (Branch: PHP_5_1) /php-src/tests/lang bug35176.phpt Modified files: /php-src NEWS /php-src/main main.c Log: Fixed bug #35176 (include()/require()/*_once() produce wrong error messages about main()) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.187&r2=1.2027.2.188&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.187 php-src/NEWS:1.2027.2.188 --- php-src/NEWS:1.2027.2.187 Mon Nov 14 16:54:35 2005 +++ php-src/NEWS Tue Nov 15 06:13:35 2005 @@ -7,6 +7,8 @@ - Fixed initializing and argument checking for posix_mknod(). (Derick) - Fixed bug #35197 (Destructor is not called). (Tony) - Fixed bug #35179 (tokenizer extension needs T_HALT_COMPILER). (Greg) +- Fixed bug #35176 (include()/require()/*_once() produce wrong error messages + about main()). (Dmitry) - Fixed bug #35142 (SOAP Client/Server Complex Object Support). (Dmitry) - Fixed bug #35135 (PDOStatment without related PDO object may crash). (Ilia) - Fixed bug #35091 (SoapClient leaks memory). (Dmitry) http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.640.2.6&r2=1.640.2.7&ty=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.6 php-src/main/main.c:1.640.2.7 --- php-src/main/main.c:1.640.2.6 Sun Oct 9 22:26:56 2005 +++ php-src/main/main.c Tue Nov 15 06:13:42 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.640.2.6 2005/10/10 02:26:56 rrichards Exp $ */ +/* $Id: main.c,v 1.640.2.7 2005/11/15 11:13:42 dmitry Exp $ */ /* {{{ includes */ @@ -452,6 +452,33 @@ function = "PHP Startup"; } else if (php_during_module_shutdown()) { function = "PHP Shutdown"; + } else if (EG(current_execute_data) && + EG(current_execute_data)->opline && + EG(current_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL) { + switch (EG(current_execute_data)->opline->op2.u.constant.value.lval) { + case ZEND_EVAL: + function = "eval"; + is_function = 1; + break; + case ZEND_INCLUDE: + function = "include"; + is_function = 1; + break; + case ZEND_INCLUDE_ONCE: + function = "include_once"; + is_function = 1; + break; + case ZEND_REQUIRE: + function = "require"; + is_function = 1; + break; + case ZEND_REQUIRE_ONCE: + function = "require_once"; + is_function = 1; + break; + default: + function = "Unknown"; + } } else { function = get_active_function_name(TSRMLS_C); if (!function || !strlen(function)) { http://cvs.php.net/co.php/php-src/tests/lang/bug35176.phpt?r=1.1&p=1 Index: php-src/tests/lang/bug35176.phpt +++ php-src/tests/lang/bug35176.phpt

« previous php.cvs (#35118) next »