Despite being documented, the array returned by gd_info() doesn't have a 'WebP
Support' key. This patch adds it.
add_assoc_bool(return_value, "XPM Support", 0);
#endif
add_assoc_bool(return_value, "XBM Support", 1);
+#ifdef HAVE_GD_WEBP
+ add_assoc_bool(return_value, "WebP Support", 1);
+#else
+ add_assoc_bool(return_value, "WebP Support", 0);
+#endif
#if defined(USE_GD_JISX0208)
add_assoc_bool(return_value, "JIS-mapped Japanese Font Support", 1);
#else
--- /dev/null
+--TEST--
+Bug #70047 (gd_info() doesn't report WebP support)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+$info = gd_info();
+var_dump(array_key_exists('WebP Support', $info));
+var_dump($info['WebP Support'] === function_exists('imagewebp'));
+?>
+--EXPECT--
+bool(true)
+bool(true)