1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 12:42:29 +02:00
Files
archived-php-src/ext/gd/libgd
Denis Ryabov b456ae8d34 Restore Warning instead of Fatal Error in gd_webp.c
According to the docs (https://www.php.net/manual/en/function.imagecreatefromwebp.php and https://www.php.net/manual/en/function.imagewebp.php), `false` should be returned on errors (similar to other functions of the `gd` extension), but actually all errors result in a `Fatal Error`. It doesn't look normal when trying to read an empty file or a file in the wrong format causes the program to stop. The problem seems to be related to a mega-patch that replaced `zend_error` with `zend_error_noreturn` almost everywhere. My patch fixes this behavior by switching from `zend_error_noerror` to `gd_error` (i.e. to `E_WARNING` level). All necessary memory cleanup is already in the code (as it was before the "zend_error_noreturn" patch).

Close GH-13774
2024-07-13 16:58:54 +01:00
..
2020-01-16 19:14:31 +01:00
2021-06-10 12:32:30 +02:00
2021-06-10 12:32:30 +02:00
2019-06-19 15:09:00 +02:00
2020-01-09 00:17:14 +01:00
2022-02-08 10:48:21 +01:00
2020-05-20 18:22:09 +02:00
2019-06-20 23:40:51 +02:00
2021-05-06 12:16:35 +02:00
2021-09-23 23:16:40 +02:00
2021-08-12 23:19:13 +02:00
2019-03-17 23:29:51 +01:00
2021-08-02 21:51:26 +02:00
2020-01-16 19:14:31 +01:00