@@ -2014,11 +2014,13 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2014
2014
zend_string * key = NULL ;
2015
2015
bool from_shared_memory ; /* if the script we've got is stored in SHM */
2016
2016
2017
- if (!file_handle -> filename || !ZCG (accelerator_enabled )) {
2017
+ zend_string * filename = file_handle -> filename ;
2018
+
2019
+ if (!filename || !ZCG (accelerator_enabled )) {
2018
2020
/* The Accelerator is disabled, act as if without the Accelerator */
2019
2021
ZCG (cache_opline ) = NULL ;
2020
2022
ZCG (cache_persistent_script ) = NULL ;
2021
- if (file_handle -> filename
2023
+ if (filename
2022
2024
&& ZCG (accel_directives ).file_cache
2023
2025
&& ZCG (enabled ) && accel_startup_ok ) {
2024
2026
return file_cache_compile_file (file_handle , type );
@@ -2057,21 +2059,21 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2057
2059
} else {
2058
2060
if (!ZCG (accel_directives ).revalidate_path ) {
2059
2061
/* try to find cached script by key */
2060
- key = accel_make_persistent_key (file_handle -> filename );
2062
+ key = accel_make_persistent_key (filename );
2061
2063
if (!key ) {
2062
2064
ZCG (cache_opline ) = NULL ;
2063
2065
ZCG (cache_persistent_script ) = NULL ;
2064
2066
return accelerator_orig_compile_file (file_handle , type );
2065
2067
}
2066
2068
persistent_script = zend_accel_hash_find (& ZCSG (hash ), key );
2067
- } else if (UNEXPECTED (is_stream_path (ZSTR_VAL (file_handle -> filename )) && !is_cacheable_stream_path (ZSTR_VAL (file_handle -> filename )))) {
2069
+ } else if (UNEXPECTED (is_stream_path (ZSTR_VAL (filename )) && !is_cacheable_stream_path (ZSTR_VAL (filename )))) {
2068
2070
ZCG (cache_opline ) = NULL ;
2069
2071
ZCG (cache_persistent_script ) = NULL ;
2070
2072
return accelerator_orig_compile_file (file_handle , type );
2071
2073
}
2072
2074
2073
- if (!persistent_script && zend_zip_cache && file_handle -> filename ) {
2074
- persistent_script = zend_zip_cache_script_load (zend_zip_cache , file_handle -> filename );
2075
+ if (!persistent_script && zend_zip_cache && filename ) {
2076
+ persistent_script = zend_zip_cache_script_load (zend_zip_cache , filename );
2075
2077
}
2076
2078
2077
2079
if (!persistent_script ) {
@@ -2083,9 +2085,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2083
2085
&& accelerator_orig_zend_stream_open_function (file_handle ) == FAILURE ) {
2084
2086
if (!EG (exception )) {
2085
2087
if (type == ZEND_REQUIRE ) {
2086
- zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , ZSTR_VAL (file_handle -> filename ));
2088
+ zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , ZSTR_VAL (filename ));
2087
2089
} else {
2088
- zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , ZSTR_VAL (file_handle -> filename ));
2090
+ zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , ZSTR_VAL (filename ));
2089
2091
}
2090
2092
}
2091
2093
return NULL ;
@@ -2140,9 +2142,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2140
2142
UNEXPECTED (check_persistent_script_access (persistent_script ))) {
2141
2143
if (!EG (exception )) {
2142
2144
if (type == ZEND_REQUIRE ) {
2143
- zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , ZSTR_VAL (file_handle -> filename ));
2145
+ zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , ZSTR_VAL (filename ));
2144
2146
} else {
2145
- zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , ZSTR_VAL (file_handle -> filename ));
2147
+ zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , ZSTR_VAL (filename ));
2146
2148
}
2147
2149
}
2148
2150
return NULL ;
0 commit comments