Skip to content

Commit a99b35b

Browse files
committed
ext/gd: Fix comparison with result of php_stream_can_cast()
1 parent a402eda commit a99b35b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/gd/gd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
15891589
pefree(pstr, 1);
15901590
zend_string_release_ex(buff, 0);
15911591
}
1592-
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO)) {
1592+
else if (php_stream_can_cast(stream, PHP_STREAM_AS_STDIO) == SUCCESS) {
15931593
/* try and force the stream to be FILE* */
15941594
if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO | PHP_STREAM_CAST_TRY_HARD, (void **) &fp, REPORT_ERRORS)) {
15951595
goto out_err;

0 commit comments

Comments
 (0)