cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h /tests bug39542.phpt /tests/bug39542 bug39542.php php-src NEWS

From: Date: Fri, 11 May 2007 08:02:44 +0000
Subject: cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h /tests bug39542.phpt /tests/bug39542 bug39542.php php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5792@lists.php.net to get a copy of this message
dmitry Fri May 11 08:02:44 2007 UTC Added files: (Branch: PHP_5_2) /ZendEngine2/tests bug39542.phpt /ZendEngine2/tests/bug39542 bug39542.php Modified files: /php-src NEWS /ZendEngine2 zend_vm_def.h zend_vm_execute.h Log: Fixed bug #39542 (Behaviour of require/include different to < 5.2.0) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.695&r2=1.2027.2.547.2.696&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.695 php-src/NEWS:1.2027.2.547.2.696 --- php-src/NEWS:1.2027.2.547.2.695 Thu May 10 22:10:43 2007 +++ php-src/NEWS Fri May 11 08:02:42 2007 @@ -30,6 +30,8 @@ - Fixed bug #41097 (ext/soap returning associative array as indexed without using WSDL). (Dmitry) - Fixed bug #41004 (minOccurs="0" and null class member variable). (Dmitry) +- Fixed bug #39542 (Behaviour of require/include different to < 5.2.0). + (Dmitry) 03 May 2007, PHP 5.2.2 - Improved bundled GD http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.43&r2=1.59.2.29.2.44&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.43 ZendEngine2/zend_vm_def.h:1.59.2.29.2.44 --- ZendEngine2/zend_vm_def.h:1.59.2.29.2.43 Mon Apr 16 08:09:55 2007 +++ ZendEngine2/zend_vm_def.h Fri May 11 08:02:42 2007 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.59.2.29.2.43 2007/04/16 08:09:55 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.59.2.29.2.44 2007/05/11 08:02:42 dmitry Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -2783,22 +2783,19 @@ case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; - char cwd[MAXPATHLEN]; - cwd_state state; if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) { - cwd[0] = '\0'; - } else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) { - cwd[0] = '\0'; - } - - state.cwd_length = strlen(cwd); - state.cwd = zend_strndup(cwd, state.cwd_length); + cwd_state state; + + state.cwd_length = 0; + state.cwd = malloc(1); + state.cwd[0] = 0; - failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && - zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); + failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && + zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); - free(state.cwd); + free(state.cwd); + } if (failure_retval) { /* do nothing */ http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.43&r2=1.62.2.30.2.44&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.43 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.44 --- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.43 Mon Apr 16 08:09:55 2007 +++ ZendEngine2/zend_vm_execute.h Fri May 11 08:02:42 2007 @@ -1958,22 +1958,19 @@ case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; - char cwd[MAXPATHLEN]; - cwd_state state; if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) { - cwd[0] = '\0'; - } else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) { - cwd[0] = '\0'; - } + cwd_state state; - state.cwd_length = strlen(cwd); - state.cwd = zend_strndup(cwd, state.cwd_length); + state.cwd_length = 0; + state.cwd = malloc(1); + state.cwd[0] = 0; - failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && - zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); + failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && + zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); - free(state.cwd); + free(state.cwd); + } if (failure_retval) { /* do nothing */ @@ -4525,22 +4522,19 @@ case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; - char cwd[MAXPATHLEN]; - cwd_state state; if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) { - cwd[0] = '\0'; - } else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) { - cwd[0] = '\0'; - } + cwd_state state; - state.cwd_length = strlen(cwd); - state.cwd = zend_strndup(cwd, state.cwd_length); + state.cwd_length = 0; + state.cwd = malloc(1); + state.cwd[0] = 0; - failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && - zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); + failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && + zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); - free(state.cwd); + free(state.cwd); + } if (failure_retval) { /* do nothing */ @@ -7659,22 +7653,19 @@ case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; - char cwd[MAXPATHLEN]; - cwd_state state; if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) { - cwd[0] = '\0'; - } else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) { - cwd[0] = '\0'; - } + cwd_state state; - state.cwd_length = strlen(cwd); - state.cwd = zend_strndup(cwd, state.cwd_length); + state.cwd_length = 0; + state.cwd = malloc(1); + state.cwd[0] = 0; - failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && - zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); + failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && + zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); - free(state.cwd); + free(state.cwd); + } if (failure_retval) { /* do nothing */ @@ -19723,22 +19714,19 @@ case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; - char cwd[MAXPATHLEN]; - cwd_state state; if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) { - cwd[0] = '\0'; - } else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) { - cwd[0] = '\0'; - } + cwd_state state; - state.cwd_length = strlen(cwd); - state.cwd = zend_strndup(cwd, state.cwd_length); + state.cwd_length = 0; + state.cwd = malloc(1); + state.cwd[0] = 0; - failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && - zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); + failure_retval = (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && + zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)); - free(state.cwd); + free(state.cwd); + } if (failure_retval) { /* do nothing */ http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug39542.phpt?view=markup&rev=1.1 Index: ZendEngine2/tests/bug39542.phpt +++ ZendEngine2/tests/bug39542.phpt http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug39542/bug39542.php?view=markup&rev=1.1 Index: ZendEngine2/tests/bug39542/bug39542.php +++ ZendEngine2/tests/bug39542/bug39542.php

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