WordPress.org

Ready to get started?Download WordPress

Forums

Fancier Author Box by ThematoSoup
[resolved] [Small bug+fix] PHP error on search page (4 posts)

  1. jrf
    Member
    Posted 11 months ago #

    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

    http://wordpress.org/plugins/fancier-author-box/

  2. Slobodan Manic
    Member
    Plugin Author

    Posted 11 months ago #

    Thank you Juliete, we'll fix this!

  3. Slobodan Manic
    Member
    Plugin Author

    Posted 11 months ago #

    Juliete,

    Thanks again, this should be fixed in 1.1

  4. jrf
    Member
    Posted 11 months ago #

    Excellent! Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic