Skip to content

Commit a5ab365

Browse files
author
Mikhail Galanin
committed
Invalidate path even if the file was deleted
1 parent 14b8270 commit a5ab365

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,9 @@ zend_result zend_accel_invalidate(zend_string *filename, bool force)
13991399
realpath = accelerator_orig_zend_resolve_path(filename);
14001400

14011401
if (!realpath) {
1402-
return FAILURE;
1402+
//file could have been deleted, but we still need to invalidate it.
1403+
//so instead of failing, just use the provided filename for the lookup
1404+
realpath = zend_string_copy(filename);
14031405
}
14041406

14051407
if (ZCG(accel_directives).file_cache) {

0 commit comments

Comments
 (0)