WordPress.org

Ready to get started?Download WordPress

Forums

Members
[resolved] Creating default object from empty value in functions.php (7 posts)

  1. senex
    Member
    Posted 1 year ago #

    Warning: Creating default object from empty value in /web/wp-content/plugins/members/includes/functions.php on line 21

    After I enable this plugin, I get the above message displayed on every page of the site. When I disable the plugin the error goes away.

    Any suggestions?

    http://wordpress.org/extend/plugins/members/

  2. milohill
    Member
    Posted 1 year ago #

    I managed to fix this error by adding in the line:

    if(!is_object($members))
    	    $members = new stdClass;

    just above if ( !isset( $members->settings ) )

  3. milohill
    Member
    Posted 1 year ago #

    In /web/wp-content/plugins/members/includes/functions.php

  4. styledev
    Member
    Posted 1 year ago #

    Seems to only kick out this issue in PHP 5.4.4

  5. cooperanet
    Member
    Posted 1 year ago #

    I've got this error too in PHP 5.4.3

  6. Scott Cariss
    Member
    Posted 1 year ago #

    I've got this error in PHP 5.4.3 too.

  7. JEPSONRAE
    Member
    Posted 1 year ago #

    I just came across this error today when we moved from PHP 5.3 to 5.4.latest.

    Applying the fix above sorted the issue - can this not be integrated into the actual plugin's code as I don't want a non-updatable plugin.

    Thanks
    Phil

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic