From 6d0db528962bb29df71a368aa4dbfa10511b5418 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 13 Jul 2024 19:19:44 +0200 Subject: [PATCH] Add test case for GH-13774 Besides demonstrating the new behavior, this test also ensures that the bundled and external libgd now behave the same. It has to be noted, though, that we only test one of the five code paths. Closes GH-14945. --- ext/gd/tests/gh13774.phpt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ext/gd/tests/gh13774.phpt diff --git a/ext/gd/tests/gh13774.phpt b/ext/gd/tests/gh13774.phpt new file mode 100644 index 00000000000..8245564efba --- /dev/null +++ b/ext/gd/tests/gh13774.phpt @@ -0,0 +1,25 @@ +--TEST-- +GH-13774 (Restore Warning instead of Fatal Error in gd_webp.c) +--EXTENSIONS-- +gd +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +Warning: imagecreatefromwebp(): gd-webp cannot get webp info in %s on line %d + +Warning: imagecreatefromwebp(): "%s" is not a valid WEBP file in %s on line %d +bool(false)