Skip to:
Content
Pages
Categories
Search
Top
Bottom

[resolved] Error on PHP 5.3

  • Does anyone else get this error in the forum when you have upgraded to PHP 5.3.0? I know this is due to many deprecated features in this version of PHP. Does a recent version of bbPress correct it?

    Strict Standards: Creating default object from empty value in /<<pathname>>/forum/config.php on line 15

Viewing 2 replies - 1 through 2 (of 2 total)
  • Seemed to have solved this, so I’ll post the answers for anyone else who has this problem.

    PHP 5.3+ now requires you to define an object explicitly ($object = new className();). The $bb variable in older versions of bbPress is an object which is implicitly defined in config.php. Thus, if you define it explictly as an object of type stdClass, the error goes away, like so:

    $bb = new stdClass();

    WARNING: I have not fully tested this, so use at your own risk.

    However, I also noted that in bbPress 1.0.2, the whole $bb object seems to be deprecated, so it is likely that if you upgrade to the newest version, the errors will also go away. I can’t upgrade just yet, so I haven’t tried this either.

    Cheers!


    Ben L.
    Member

    @nightgunner5

    It’s already in the code – http://phpxref.ftwr.co.uk/bbpress/bb-load.php.source.html#l153

    You should really update to the latest version – it has multiple security fixes over your version.

    (And btw, config.php is deprecated – bb-config.php is where it’s at!)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar