WordPress.org

Support

Support » Plugins and Hacks » Deprecated: Assigning the return value

Deprecated: Assigning the return value

  • Hi every Moderators

    Deprecated: Assigning the return value of new by reference is deprecated in …\wp-content\plugins\bp-moderation\classes\bpModeration.php on line 117

    Is there any one who can point a direction to exhange this method before the fallback removes. Seems like a PHP4 fallback, and we don need that.

    Here is the code


    /**
    * why $_istance is an array? Zend 1 engine (php4) can't store a reference in
    * a static var, but can store it as a value of a static array
    */
    function &get_istance($cname = false)
    {
    static $_instance = null;

    if (null === $_instance && $cname) {

    bpModLoader::load_class($cname);
    $ref = & new $cname;

    $_instance = array(&$ref);
    }

    return $_instance[0];
    }

    ?

    /

    http://wordpress.org/extend/plugins/bp-moderation/

  • The topic ‘Deprecated: Assigning the return value’ is closed to new replies.