PHP 8.1 fatal error on plugin list with SVG icon
-
Hi, on a clean install WP 6.1.1 with PHP 8.1 there is a fatal error due to ltrim() used with an array in formatting.php, started by esc_url(). The problem appears in the plugin list when a plugin (like jetpack) has an SVG icon.
In the class WP_Plugin_Install_List_Table line 740, the $plugin_icon_url for an SVG icon is an array, not an URL string. Probably the problem is in the plugin API e not in WP. Here is the “icon” for JetPack:
[16-Mar-2023 06:30:15 UTC] Array ( [filename] => icon.svg [revision] => 2819237 [resolution] => [location] => assets [locale] => )
while other plugin icons, like Akismet are like:
[16-Mar-2023 06:48:27 UTC] https://ps.w.org/akismet/assets/icon-256x256.png?rev=2818463
Thank you, Stefano.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP 8.1 fatal error on plugin list with SVG icon’ is closed to new replies.