com php-src: fix bug#68942's patch: ext/date/php_date.c

From: Date: Fri, 27 Feb 2015 02:41:53 +0000
Subject: com php-src: fix bug#68942's patch: ext/date/php_date.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85098@lists.php.net to get a copy of this message
Commit: e441d71baae89bdc5dc6f75407b4a8f5e42b8fa9 Author: Taoguang Chen <chtg@users.noreply.github.com> Fri, 27 Feb 2015 10:41:53 +0800 Parents: f13a88ac1330f81b692a565156bf5d5a8fa78d15 Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e441d71baae89bdc5dc6f75407b4a8f5e42b8fa9 Log: fix bug#68942's patch Fix type confusion bug in unserialize() with DateTimeZone.. https://bugs.php.net/bug.php?id=68942 Bugs: https://bugs.php.net/68942 Changed paths: M ext/date/php_date.c Diff: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 720cdb6..81f6ae4 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -3713,7 +3713,7 @@ static int php_date_timezone_initialize_from_hash(zval **return_value, php_timez zval **z_timezone_type = NULL; if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_timezone_type) == IS_LONG) { - if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) { + if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS && Z_TYPE_PP(z_timezone) == IS_STRING) { if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_PP(z_timezone) TSRMLS_CC)) { return SUCCESS; }

« previous php.cvs (#85098) next »