Skip to content

Commit eaf24ba

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: ext/gd: Fix comparison with result of php_stream_can_cast()
2 parents b75c2dc + 19c84e2 commit eaf24ba

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ PHP NEWS
1212
. Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (thecaliskan)
1313
. Add support for CURLOPT_SSL_SIGNATURE_ALGORITHMS. (Ayesh Karunaratne)
1414

15+
- GD:
16+
. Fix incorrect comparison with result of php_stream_can_cast(). (Girgias)
17+
1518
- OPcache:
1619
. Disallow changing opcache.memory_consumption when SHM is already set up.
1720
(timwolla)

ext/gd/gd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
15731573
pefree(pstr, 1);
15741574
zend_string_release_ex(buff, 0);
15751575
}
1576-
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO)) {
1576+
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO) == SUCCESS) {
15771577
/* try and force the stream to be FILE* */
15781578
if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO | PHP_STREAM_CAST_TRY_HARD, (void **) &fp, REPORT_ERRORS)) {
15791579
goto out_err;

0 commit comments

Comments
 (0)