Merge branch 'PHP-8.4'

* PHP-8.4:
  Fix memory leak in intl_datetime_decompose()
This commit is contained in:
Niels Dossche 2025-05-24 14:56:41 +02:00
commit 5e21ffe09a
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5

View file

@ -124,6 +124,7 @@ U_CFUNC zend_result intl_datetime_decompose(zend_object *obj, double *millis, Ti
}
// TODO: Remove this when DateTimeInterface::getTimestamp() no longer has a tentative return type
if (Z_TYPE(retval) != IS_LONG) {
zval_ptr_dtor(&retval);
spprintf(&message, 0, "%s: %s::getTimestamp() did not return an int", func, ZSTR_VAL(obj->ce->name));
intl_errors_set(err, U_INTERNAL_PROGRAM_ERROR, message, 1);
efree(message);