@@ -1679,11 +1679,13 @@ static zend_persistent_script *opcache_compile_file(zend_file_handle *file_handl
1679
1679
if (file_handle -> type == ZEND_HANDLE_FILENAME ) {
1680
1680
if (accelerator_orig_zend_stream_open_function (file_handle -> filename , file_handle ) != SUCCESS ) {
1681
1681
* op_array_p = NULL ;
1682
- if (type == ZEND_REQUIRE ) {
1683
- zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
1684
- zend_bailout ();
1685
- } else {
1686
- zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
1682
+ if (!EG (exception )) {
1683
+ if (type == ZEND_REQUIRE ) {
1684
+ zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
1685
+ zend_bailout ();
1686
+ } else {
1687
+ zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
1688
+ }
1687
1689
}
1688
1690
return NULL ;
1689
1691
}
@@ -1827,11 +1829,13 @@ zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int type)
1827
1829
if (!file_handle -> opened_path ) {
1828
1830
if (file_handle -> type == ZEND_HANDLE_FILENAME &&
1829
1831
accelerator_orig_zend_stream_open_function (file_handle -> filename , file_handle ) == FAILURE ) {
1830
- if (type == ZEND_REQUIRE ) {
1831
- zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
1832
- zend_bailout ();
1833
- } else {
1834
- zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
1832
+ if (!EG (exception )) {
1833
+ if (type == ZEND_REQUIRE ) {
1834
+ zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
1835
+ zend_bailout ();
1836
+ } else {
1837
+ zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
1838
+ }
1835
1839
}
1836
1840
return NULL ;
1837
1841
}
@@ -1981,11 +1985,13 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1981
1985
/* open file to resolve the path */
1982
1986
if (file_handle -> type == ZEND_HANDLE_FILENAME &&
1983
1987
accelerator_orig_zend_stream_open_function (file_handle -> filename , file_handle ) == FAILURE ) {
1984
- if (type == ZEND_REQUIRE ) {
1985
- zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
1986
- zend_bailout ();
1987
- } else {
1988
- zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
1988
+ if (!EG (exception )) {
1989
+ if (type == ZEND_REQUIRE ) {
1990
+ zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
1991
+ zend_bailout ();
1992
+ } else {
1993
+ zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
1994
+ }
1989
1995
}
1990
1996
return NULL ;
1991
1997
}
@@ -2037,11 +2043,13 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2037
2043
UNEXPECTED (ZCG (accel_directives ).validate_permission ) &&
2038
2044
file_handle -> type == ZEND_HANDLE_FILENAME &&
2039
2045
UNEXPECTED (check_persistent_script_access (persistent_script ))) {
2040
- if (type == ZEND_REQUIRE ) {
2041
- zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
2042
- zend_bailout ();
2043
- } else {
2044
- zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
2046
+ if (!EG (exception )) {
2047
+ if (type == ZEND_REQUIRE ) {
2048
+ zend_message_dispatcher (ZMSG_FAILED_REQUIRE_FOPEN , file_handle -> filename );
2049
+ zend_bailout ();
2050
+ } else {
2051
+ zend_message_dispatcher (ZMSG_FAILED_INCLUDE_FOPEN , file_handle -> filename );
2052
+ }
2045
2053
}
2046
2054
return NULL ;
2047
2055
}
0 commit comments