mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Avoid unnecessary string refcounting in ext/date (#17890)
This commit is contained in:
@@ -4682,9 +4682,10 @@ static void php_date_interval_initialize_from_hash(zval **return_value, php_inte
|
||||
if (z_arg && Z_TYPE_P(z_arg) == IS_FALSE) { \
|
||||
(*intobj)->diff->member = TIMELIB_UNSET; \
|
||||
} else if (z_arg && Z_TYPE_P(z_arg) <= IS_STRING) { \
|
||||
zend_string *str = zval_get_string(z_arg); \
|
||||
zend_string *tmp_str; \
|
||||
zend_string *str = zval_get_tmp_string(z_arg, &tmp_str); \
|
||||
DATE_A64I((*intobj)->diff->member, ZSTR_VAL(str)); \
|
||||
zend_string_release(str); \
|
||||
zend_tmp_string_release(tmp_str); \
|
||||
} else { \
|
||||
(*intobj)->diff->member = -1LL; \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user