]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone)
authorIlia Alshanetsky <iliaa@php.net>
Fri, 23 Nov 2007 00:16:48 +0000 (00:16 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 23 Nov 2007 00:16:48 +0000 (00:16 +0000)
NEWS
ext/date/php_date.c

diff --git a/NEWS b/NEWS
index c510ddfc9692d1ab4f5efd5fa720a4fcc2503b94..6fb392b6e8e60483faa793620c721f18995d9c52 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2008, PHP 5.2.6
+- Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone). (Ilia)
 - Fixed bug #43092 (curl_copy_handle() crashes with > 32 chars long URL).
   (Jani)
 - Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is
index b8be9e6b738350a48a701a2a1aff66885ddac110..47bd15b91bcbb6dd4a9d4bdeeb5e5c1b379b9c72 100644 (file)
@@ -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);