diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-11-23 00:15:24 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-11-23 00:15:24 +0000 |
commit | a4e39692152deb8c2970dbdc80b5801c919c4682 (patch) | |
tree | 43b36c52f96eb5f3ac9fda0c641c9cae4d1b7cf2 | |
parent | 87dfd003f7682483ef18bd581012a7c0a875b62f (diff) | |
download | php-git-a4e39692152deb8c2970dbdc80b5801c919c4682.tar.gz |
Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone)
-rw-r--r-- | ext/date/php_date.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index eb187b8a12..57205e44b0 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2066,6 +2066,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); |