From 3c8c347fa7c420035509324b764c0b38c2b71913 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 7 Dec 2016 15:10:59 +0300 Subject: [PATCH] Check if PHP is in execution state. --- Zend/zend_exceptions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index e0aa370bfe0..bac9d34b055 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -186,7 +186,9 @@ ZEND_API void zend_clear_exception(void) /* {{{ */ } OBJ_RELEASE(EG(exception)); EG(exception) = NULL; - EG(current_execute_data)->opline = EG(opline_before_exception); + if (EG(current_execute_data)) { + EG(current_execute_data)->opline = EG(opline_before_exception); + } #if ZEND_DEBUG EG(opline_before_exception) = NULL; #endif