Info
- 4 posts
- 2 voices
- Started 2 years ago by Florian
- Latest reply from Florian
- This topic is resolved
Call to undefined function: add_option()
-
- Posted 2 years ago #
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...
-
- Posted 2 years ago #
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...
-
- Posted 2 years ago #
Change that
add_option()tobackpress_add_option()This is now fixed in trunk.
-
- Posted 2 years ago #
Thanks. I manually added your fix to my installation and it seems to work fine. :)
-
You must log in to post.