When visiting a gallery with no images*:
“Warning: Invalid argument supplied for foreach() in …/wp-content/plugins/image-store/_inc/store.php on line 954”
* May seem like an edge case but galleries may stay linked/bookmarked by visitors and later have images removed by the site admin.
1. Visit a gallery
2. Open new browser tab, go to WP Admin > Gallery > galleryname
3. Trash all the images
4. Reload gallery in the first tab; php warning occurs.
This scenario should be handled gracefully with a simple message like “Sorry, there are no images in this gallery.”