com php-src: backport to 5.6 (we should not unset the default value): NEWS Zend/zend_exceptions.c ext/standard/tests/serialize/bug 69152.phpt
ext/standard/tests/serialize/bug69 793.phpt

From: Date: Tue, 12 Jul 2016 04:14:45 +0000
Subject: com php-src: backport to 5.6 (we should not unset the default value): NEWS Zend/zend_exceptions.c ext/standard/tests/serialize/bug 69152.phpt
ext/standard/tests/serialize/bug69 793.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92944@lists.php.net to get a copy of this message
Commit: 7903276f4c18fcfda06c02785f0b4201421f9c7c Author: Xinchen Hui <laruence@gmail.com> Tue, 12 Jul 2016 12:14:45 +0800 Parents: 966311e6274e59d0eabdccf5bf9c5d554c90202c Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7903276f4c18fcfda06c02785f0b4201421f9c7c Log: backport to 5.6 (we should not unset the default value) Changed paths: M NEWS M Zend/zend_exceptions.c M ext/standard/tests/serialize/bug69152.phpt M ext/standard/tests/serialize/bug69793.phpt Diff: diff --git a/NEWS b/NEWS index 2b21a03..5da0c57 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2016, PHP 5.6.25 - Core: + . Fixed bug #72581 (previous property undefined in Exception after + deserialization). (Laruence) . Fixed bug #72024 (microtime() leaks memory). (maroszek at gmx dot net) - Curl: diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 66476a1..fda4d21 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); \ diff --git a/ext/standard/tests/serialize/bug69152.phpt b/ext/standard/tests/serialize/bug69152.phpt index bc2b302..4e74168 100644 --- a/ext/standard/tests/serialize/bug69152.phpt +++ b/ext/standard/tests/serialize/bug69152.phpt @@ -9,7 +9,6 @@ $x->test(); ?> --EXPECTF-- -Notice: Undefined property: Exception::$previous in %s on line %d exception 'Exception' in %s:%d Stack trace: #0 {main} diff --git a/ext/standard/tests/serialize/bug69793.phpt b/ext/standard/tests/serialize/bug69793.phpt index 624f1ac..b5784b8 100644 --- a/ext/standard/tests/serialize/bug69793..phpt +++ b/ext/standard/tests/serialize/bug69793.phpt @@ -7,8 +7,6 @@ $e = unserialize('O:9:"Exception":7:{s:17:"'."\0".'Exception'."\0".'string";s:1: var_dump($e.""); ?> --EXPECTF-- -Notice: Undefined property: Exception::$message in %s%ebug69793.php on line %d - Notice: Undefined property: Exception::$file in %s%ebug69793.php on line %d Notice: Undefined property: Exception::$previous in %s%ebug69793.php on line %d

« previous php.cvs (#92944) next »