mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Reverted last Ilia's patch (for bug #38579).
The patch didn't fix the bug and made new one.
This commit is contained in:
parent
bd5e8f77bd
commit
afb8af1f5f
2
NEWS
2
NEWS
@ -6,8 +6,6 @@
|
||||
- Fixed bug #38700 (SoapClient::__getTypes never returns). (Dmitry)
|
||||
- Fixed bug #38693 (curl_multi_add_handle() set curl handle to null). (Ilia)
|
||||
- Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia)
|
||||
- Fixed bug #38579 require_once/include_once optimization causes files to be
|
||||
loaded multiple times. (Ilia)
|
||||
|
||||
|
||||
31 Aug 2006, PHP 5.2.0RC3
|
||||
|
@ -2773,23 +2773,19 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
|
||||
char cwd[MAXPATHLEN];
|
||||
cwd_state state;
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
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';
|
||||
}
|
||||
#endif
|
||||
|
||||
state.cwd_length = strlen(cwd);
|
||||
state.cwd = zend_strndup(cwd, state.cwd_length);
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
if (state.cwd_length > 0 && !virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
|
||||
if (!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=1;
|
||||
} else
|
||||
#endif
|
||||
if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
|
||||
|
@ -1937,23 +1937,19 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
char cwd[MAXPATHLEN];
|
||||
cwd_state state;
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
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';
|
||||
}
|
||||
#endif
|
||||
|
||||
state.cwd_length = strlen(cwd);
|
||||
state.cwd = zend_strndup(cwd, state.cwd_length);
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
if (state.cwd_length > 0 && !virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
|
||||
if (!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=1;
|
||||
} else
|
||||
#endif
|
||||
if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
|
||||
@ -4459,23 +4455,19 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
char cwd[MAXPATHLEN];
|
||||
cwd_state state;
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
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';
|
||||
}
|
||||
#endif
|
||||
|
||||
state.cwd_length = strlen(cwd);
|
||||
state.cwd = zend_strndup(cwd, state.cwd_length);
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
if (state.cwd_length > 0 && !virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
|
||||
if (!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=1;
|
||||
} else
|
||||
#endif
|
||||
if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
|
||||
@ -7563,23 +7555,19 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
char cwd[MAXPATHLEN];
|
||||
cwd_state state;
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
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';
|
||||
}
|
||||
#endif
|
||||
|
||||
state.cwd_length = strlen(cwd);
|
||||
state.cwd = zend_strndup(cwd, state.cwd_length);
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
if (state.cwd_length > 0 && !virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
|
||||
if (!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=1;
|
||||
} else
|
||||
#endif
|
||||
if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
|
||||
@ -19963,23 +19951,19 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
|
||||
char cwd[MAXPATHLEN];
|
||||
cwd_state state;
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
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';
|
||||
}
|
||||
#endif
|
||||
|
||||
state.cwd_length = strlen(cwd);
|
||||
state.cwd = zend_strndup(cwd, state.cwd_length);
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
if (state.cwd_length > 0 && !virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
|
||||
if (!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=1;
|
||||
} else
|
||||
#endif
|
||||
if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
|
||||
|
||||
if (!file_handle.opened_path) {
|
||||
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
|
||||
|
Loading…
Reference in New Issue
Block a user