mirror of
https://github.com/php/php-src.git
synced 2025-01-25 21:23:45 +08:00
Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone)
This commit is contained in:
parent
87dfd003f7
commit
a4e3969215
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user