diff options
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index f6b12bc42..deb284ef8 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2781,6 +2781,10 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat tzi = php_date_parse_tzfile(Z_STRVAL_PP(z_timezone), DATE_TIMEZONEDB TSRMLS_CC); + if (tzi == NULL) { + return 0; + } + ALLOC_INIT_ZVAL(tmp_obj); tzobj = zend_object_store_get_object(php_date_instantiate(date_ce_timezone, tmp_obj TSRMLS_CC) TSRMLS_CC); tzobj->type = TIMELIB_ZONETYPE_ID; |