• 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?26

    I 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)
  • carloscastilloadhoc

    (@carloscastilloadhoc)

    Thank you for this, youtag, I was having the same problem, it was happening with a specific 10 photo gallery to me.

    If any of the staff is reading this please add this fix to your plugin in a future update.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.