• Resolved ugy

    (@ugy)


    Hi Navneil,
    I had a problem saving a post with an empty gallery.
    It was throwing an error:

    Notice: Undefined index: gallery in /Users/***/*****/htdocs/steelroots/wp-content/plugins/navz-photo-gallery/fields/acf-photo_gallery-v4.php on line 15

    so I changed line 15 in fields/acf-photo_gallery-v4.php to include a check to see if a gallery was actually being posted:

    $ids = !empty($field) && isset($_POST[$field_id])? $_POST[$field_id]: null;

    I hope this is helpful.
    Cheers!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘error on saving post with empty gallery’ is closed to new replies.