Fatal Error on both front- and backend
-
Following error crashes both Gutenberg editor and Elementor Gallery in frontend.
Fatal error: Uncaught Error: array_keys(): Argument #1 ($array) must be of type array, null given
in?/var/www/vhosts/leader.lu/httpdocs/web/wp-content/plugins/navz-photo-gallery/includes/acf_photo_gallery.php?on line?26I fixed it by adding following condition :
if ( $meta_data['sizes'] && is_array($meta_data['sizes']) ) {
foreach (array_keys($meta_data['sizes']) as $size) {
$meta_data['sizes'][$size]['source_url'] = wp_get_attachment_image_url($image->ID, $size);
}
}It only happened on one post for me. Gallery contains 2 JPG images. Please let me know if you want me to enquire further.
I’d like to help improve this plugin because I think it is pretty damn cool.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.