diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 9caa0cb737e..dc2d3e92aad 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -4480,6 +4480,10 @@ static int accel_preload(const char *config, zend_bool in_child) destroy_op_array(op_array); efree_size(op_array, sizeof(zend_op_array)); } else { + if (EG(exception)) { + zend_exception_error(EG(exception), E_ERROR); + } + CG(unclean_shutdown) = 1; ret = FAILURE; } diff --git a/ext/opcache/tests/preload_parse_error.inc b/ext/opcache/tests/preload_parse_error.inc new file mode 100644 index 00000000000..08b9d7799cd --- /dev/null +++ b/ext/opcache/tests/preload_parse_error.inc @@ -0,0 +1,2 @@ + +--FILE-- +OK +--EXPECTF-- +Parse error: syntax error, unexpected identifier "error" in %s on line %d