Skip to content

Commit e441d71

Browse files
committed
fix bug#68942's patch
Fix type confusion bug in unserialize() with DateTimeZone. https://bugs.php.net/bug.php?id=68942
1 parent f13a88a commit e441d71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/date/php_date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3713,7 +3713,7 @@ static int php_date_timezone_initialize_from_hash(zval **return_value, php_timez
37133713
zval **z_timezone_type = NULL;
37143714

37153715
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_timezone_type) == IS_LONG) {
3716-
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
3716+
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS && Z_TYPE_PP(z_timezone) == IS_STRING) {
37173717
if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_PP(z_timezone) TSRMLS_CC)) {
37183718
return SUCCESS;
37193719
}

0 commit comments

Comments
 (0)