Skip to:

Call to undefined function: add_option()

  • I’m using bbPress RC2 integrated with WPMU 2.7.1 (cookie sharing & user table sharing). I recently updated from RC1 to RC2 and since then I sometimes (not always) get the following error message:

    Fatal error: Call to undefined function: add_option() in /[full path to bbpress]/bb-includes/backpress/class.wp-http.php on line 655

    As soon as I reload the page, the error vanishes. What might be the reason?

    If it helps: I due have the slight suspicion that the error is more likely to appear when there hasn’t been an access to bbpress for some time. But it’s hard to tell…

Viewing 3 replies - 1 through 3 (of 3 total)
  • For the time being I could fix the problem. Since I do not know what the implications are, it would probably still be better if one of you guys would take a look on it.

    Line 654 and 655 are:

    if ( true === $elapseDelay )

    add_option( ‘disable_fsockopen’, $endDelay, null, true );

    Since the forum works fine most of the time, I assume that add_option thing isn’t terribly important, so I just extended the if statement:

    if ( true === $elapseDelay && function_exists(“add_option”))

    Couldn’t see any negative side effects yet, but since this error only appeared sometimes this might be an illusion. :) In any way I have no idea what this is supposed to do in the first place, so it’s a bit of blind hacking…

    Sam Bauers


    Change that add_option() to backpress_add_option()

    This is now fixed in trunk.

    Thanks. I manually added your fix to my installation and it seems to work fine. :)

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