ronakg / awesome-flickr-gallery-plugin

Create a photo gallery of your Flickr photos on your WordPress enabled website enabling you to customize it the way you like it. This project was originally hosted at http://wordpress.org/plugins/awesome-flickr-gallery-plugin/
18 stars 20 forks source link

Notice: Undefined variables #120

Open flowdee opened 8 years ago

flowdee commented 8 years ago

Can you please set default values for your variables you're using? Would be great :smile:

Notice: Undefined variable: rel in /.../awesome-flickr-gallery-plugin/index.php on line 380
Notice: Undefined index: slideshow_option in /../awesome-flickr-gallery-plugin/index.php on line 68
slushman commented 8 years ago

Here's a temporary fix for the slideshow_option notice:

In the index.php file around line 66, just after the opening of the foreach, add the following:

if ( empty( $gallery['slideshow_option'] ) || ! isset( $gallery['slideshow_option'] ) ) { break; }

That will get exit the foreach if that value is not set and prevent the "slideshow_option" notice.

flowdee commented 8 years ago

I know how to fix this, it's just a suggestion for the developer of the plugin ;)

ronakg commented 8 years ago

Hadn't seen these before. Will fix it in next update. Thanks for the feedback.