Merge branch 'PHP-8.4'

* PHP-8.4:
  ext/gd: Fix comparison with result of php_stream_can_cast()
This commit is contained in:
Gina Peter Banyard 2025-07-28 11:55:25 +01:00
commit eaf24ba4e2
No known key found for this signature in database
GPG key ID: F30F8C1ACF51943F
2 changed files with 4 additions and 1 deletions

3
NEWS
View file

@ -12,6 +12,9 @@ PHP NEWS
. Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (thecaliskan)
. Add support for CURLOPT_SSL_SIGNATURE_ALGORITHMS. (Ayesh Karunaratne)
- GD:
. Fix incorrect comparison with result of php_stream_can_cast(). (Girgias)
- OPcache:
. Disallow changing opcache.memory_consumption when SHM is already set up.
(timwolla)

View file

@ -1573,7 +1573,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
pefree(pstr, 1);
zend_string_release_ex(buff, 0);
}
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO)) {
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO) == SUCCESS) {
/* try and force the stream to be FILE* */
if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO | PHP_STREAM_CAST_TRY_HARD, (void **) &fp, REPORT_ERRORS)) {
goto out_err;