summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-11-23 00:16:48 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-11-23 00:16:48 +0000
commit3acbcf448fc245f42d2f813c253b31e35cf79786 (patch)
tree666f34ccb8888a25d29c1a76cdce6e68bc0cf322 /ext/date
parent202e7f5b28cead3bc179436edf212944dc3d9043 (diff)
downloadphp-git-3acbcf448fc245f42d2f813c253b31e35cf79786.tar.gz
MFB: Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone)
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/php_date.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index b8be9e6b73..47bd15b91b 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);