[Small bug fix] PHP error on search page
-
Hiya,
Love the plugin! Thank you for this.
I noticed a PHP error caused by this plugin when on a search page:
PHP Notice: Trying to get property of non-object in /webroot/wp-content/plugins/fancier-author-box/ts-fab.php on line 152
Please find the fix below. I hope you’ll accept it for the next version of the plugin.
File: ts_fab.php
Find line 146:
global $authordata; global $post; // Use helper functions to get plugin settings $ts_fab_display_settings = ts_fab_get_display_settings();
Replace with:
global $authordata; global $post; // Break early if we don't have the necessary info if( ( !is_object( $authordata ) || !isset( $authordata->ID ) ) || ( !is_object( $post ) || !isset( $post->ID ) ) ) { return $content; } // Use helper functions to get plugin settings $ts_fab_display_settings = ts_fab_get_display_settings();
Hope this helps & keep up the good work!
Smile,
Juliette
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘[Small bug fix] PHP error on search page’ is closed to new replies.