wecobble / Subtitles

Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required. Simply activate Subtitles and you're ready to go.
http://wordpress.org/plugins/subtitles/
GNU General Public License v2.0
117 stars 186 forks source link

debug notice for each menu element when no search results were found #12

Closed joseluis closed 10 years ago

joseluis commented 10 years ago

This line gets printed before the menu, one time for each link it contains:

Notice: Trying to get property of non-object in /home/.../wp-content/plugins/subtitles/public/class-subtitles.php on line 543

only after searching something that didn't return results.

Tested with multiple themes, including Twenty Fourteen

philiparthurmoore commented 10 years ago

Not good. What do you mean "only after searching something that didn't return results"? Can you tell me how to reproduce this problem? I'll take care of it immediately. Thanks!

joseluis commented 10 years ago

I mean you search something in WP using the search form, and it doesn't find any matches. I'll give you an example URL, I doubt this search term will return any search results:

example.com/?s=dhasdlkjhasd1289uwljkas

See if you can reproduce it in your installation.

philiparthurmoore commented 10 years ago

Very annoying and easily overlooked bug. :) Thank you so much for spotting this.

joseluis commented 10 years ago

You're welcome. Thanks for being awesome.