Skip to content

Commit 35a4656

Browse files
authored
Fix error recording with file cache only (GH-19278)
Introduced by GH-18541. This path is hit when compilation fails with a compile error, rather than bailout. If a non-fatal error is recorded, it will not be emitted nor freed. Handle accordingly.
1 parent e48099a commit 35a4656

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,9 @@ static zend_op_array *file_cache_compile_file(zend_file_handle *file_handle, int
19641964
return zend_accel_load_script(persistent_script, from_memory);
19651965
}
19661966

1967+
zend_emit_recorded_errors();
1968+
zend_free_recorded_errors();
1969+
19671970
return op_array;
19681971
}
19691972

0 commit comments

Comments
 (0)