state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
- 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;
+ 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);
+
+ if (failure_retval) {
+ /* do nothing */
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
}
}
- free(state.cwd);
}
break;
case ZEND_INCLUDE:
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
- 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;
+ 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);
+
+ if (failure_retval) {
+ /* do nothing */
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
}
}
- free(state.cwd);
}
break;
case ZEND_INCLUDE:
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
- 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;
+ 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);
+
+ if (failure_retval) {
+ /* do nothing */
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
}
}
- free(state.cwd);
}
break;
case ZEND_INCLUDE:
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
- 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;
+ 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);
+
+ if (failure_retval) {
+ /* do nothing */
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
}
}
- free(state.cwd);
}
break;
case ZEND_INCLUDE:
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
- 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;
+ 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);
+
+ if (failure_retval) {
+ /* do nothing */
} else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
}
}
- free(state.cwd);
}
break;
case ZEND_INCLUDE: