From 7903276f4c18fcfda06c02785f0b4201421f9c7c Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 12 Jul 2016 12:14:45 +0800 Subject: backport to 5.6 (we should not unset the default value) --- Zend/zend_exceptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_exceptions.c') diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 66476a1517..fda4d21e03 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -230,7 +230,7 @@ ZEND_METHOD(exception, __construct) Exception unserialize checks */ #define CHECK_EXC_TYPE(name, type) \ value = zend_read_property(default_exception_ce, object, name, sizeof(name)-1, 0 TSRMLS_CC); \ - if(value && Z_TYPE_P(value) != type) { \ + if (value && Z_TYPE_P(value) != IS_NULL && Z_TYPE_P(value) != type) { \ zval *tmp; \ MAKE_STD_ZVAL(tmp); \ ZVAL_STRINGL(tmp, name, sizeof(name)-1, 1); \ -- cgit v1.2.1