From: Ilia Alshanetsky Date: Fri, 23 Nov 2007 00:15:37 +0000 (+0000) Subject: MFB: Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone) X-Git-Tag: RELEASE_2_0_0a1~1304 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e02a63c98ca791e394d9dfafd987b09ed46d0e9b;p=php MFB: Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone) --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 64ecaeae37..06507272f0 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2223,6 +2223,8 @@ PHP_METHOD(DateTimeZone, __construct) if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) { if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) { ((php_timezone_obj *) zend_object_store_get_object(getThis() TSRMLS_CC))->tz = tzi; + } else { + ZVAL_NULL(getThis()); } } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);