Info
- 9 posts
- 5 voices
- Started 2 years ago by jschleifer
- Latest reply from decavolt
- This topic is not resolved
Warning: Invalid argument supplied for foreach() in /bb-settings.php on line 173
-
- Posted 2 years ago #
I just upgraded to the latest wordpress 2.3 and bbpress 0.8.3 and now when I try and access any page I get the following error at the top of the page:
Warning: Invalid argument supplied for foreach() in bb-settings.php on line 173
I checked the bb-settings.php file and the line looks like:
foreach ( glob(BBPLUGINDIR . '_*.php') as $_plugin )I checked BBPLUGINDIR to see if it's been set correctly, and it does indeed point to the location of my-plugins.
I'm running PHP5 with a mamp server on os x.. I've never had a problem with bbpress before (being using it for a few months now), and only saw this error with the upgrade.
has anyone else seen this, or know how to remove it?
cheers,
Jason -
- Posted 2 years ago #
Is it possible there are no php files in that directory, so the array is empty? File permissions making them unreadable?
-
- Posted 2 years ago #
I checked file permissions & tried it both with files in it, and without.. permissions were fine, and the number of files in the directory made no difference to the error. I even tried it w/out the directory there, same error. :(
-
- Posted 2 years ago #
These are completely wild guesses, just stalling and bumping the thread until someone knowledgeable comes along.
Are there any underscore plugins in the plugin directory? What if you put an underscore plugin in that folder, if there are none now?
Is it possible
globis disabled in your php.ini, and the conditional in this file is not working properly whenglobis disabled (create a phpinfo file and look for the disabled_functions section to see if glob is there.That's all I've got right now :-)
-
- Posted 2 years ago #
thanks for trying to solve this chris! I went and tried your options..
"are there any underscore plugins in the plugin directory?"
nope, there's nothing at all in the plugin directory.
"What if you put an underscore plugin in that orlder, if there are none now?"
well I'll be.. I simply touched my-plugins/_test.php
and it worked.
that's just crazy weird.. huh. thanks for the help! :)
-
- Posted 2 years ago #
It's good that fixed it, but now I am curious why it was broken. What version of PHP are you using?
-
- Posted 2 years ago #
I did this using PHP 4 at localhost and the warning message still appear
-
- Posted 2 years ago #
I spent a whole day trying to resolve the same problem, until I came accross a sollution. Try the following improvements, worked for me.
In the bb-settings.php version 0.8.3 line 172 find the code:
if ( is_callable( 'glob' ) )
foreach ( glob(BBPLUGINDIR . '_*.php') as $_plugin )
require($_plugin);Replace it with:
if ( is_callable( 'glob' ) ) {
$pluginarray = glob(BBPLUGINDIR . '_*.php');
if ($pluginarray)
foreach ( $pluginarray as $_plugin )
require($_plugin);
}The source (in German): http://www.brusdeylins.info/bbpress/problem-in-bb-settings/#comment-67
-
- Posted 2 years ago #
Thanks Neziniux for that fix and the link.
My forum was working just fine until today when I started seeing these warnings. -
You must log in to post.