Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Installation Problem – Cannot modify header information


chrishajer
Participant

@chrishajer

I’ve seen two or three seemingly unrelated problems pop up related to something like this:

if ( is_callable( 'glob' ) )
foreach ( glob(BBPLUGINDIR . '_*.php') as $_plugin )
require($_plugin);

 

Seems like if there are no underscore plugins, this fails. I don’t follow the code exactly, but further up in that file, it defines BBPLUGINDIR if it’s not already defined as (basically) my-plugins/. But this line just says “if glob is callable, then go through the directory for all underscore plugins”. What happens if there are no plugins there? This would return false, maybe, instead of an array?

And, is there a good reason NOT to include a blank directory for my-templates and my-plugins? At least then people would know where to put stuff. I mean, what IS the reason? WordPress comes with wp-content/themes/ and wp-content/plugins/ directories, and by default, two themes and two plugins. That eliminates the possibility of something missing. Of course, people could delete those, but right off the bat, they wouldn’t and things would just work when they started out.

At the very least, I think this should be fixed to have a conditional looking for underscore plugins before looping through them (i.e. if there are none, you can’t loop through them.)

Maybe someone with a better read on it can explain to me exactly what’s happening.

Skip to toolbar