PHP 8.x Fatal Error
-
Hi team,
First of all thank you for this great plugin !
I encountered a PHP Fatal Error when trying to edit an existing carousel in the WordPress admin panel. The edit page renders completely blank (only title and sidebar are shown) due to a type error in PHP 8.x.
PHP Fatal Error Log:
PHP Warning: Trying to access array offset on false in /wp-content/plugins/wp-carousel-free/admin/views/sp-framework/fields/gallery/gallery.php on line 52 PHP Warning: Trying to access array offset on false in /wp-content/plugins/wp-carousel-free/admin/views/sp-framework/fields/gallery/gallery.php on line 53 PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, false given in /wp-content/plugins/wp-carousel-free/admin/views/sp-framework/fields/gallery/gallery.php:66 Stack trace: #0 /wp-content/plugins/wp-carousel-free/admin/views/sp-framework/fields/gallery/gallery.php(124): SP_WPCF_Field_gallery->getting_image_metadata()Cause: It seems
wp_get_attachment_metadata()returnsfalse(likely for an image/attachment that was deleted or missing from the Media Library), andgetting_image_metadata()passes thatfalsevalue directly intoarray_key_exists(). In PHP 8+, this throws a FatalTypeError.Could you please patch this in the next release?
Thanks!
You must be logged in to reply to this topic.