Skip to:

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#787 closed defect (fixed)

'glob' returns FALSE on some PHP installs causing foreach error

Reported by: _ck_ Owned by: sambauers
Milestone: 0.9 Priority: normal
Severity: normal Version:
Component: Back-end Keywords:


Unfortunately changeset 1089 was not enough.

Some PHP installs return a boolean FALSE when there are no glob matches. This loads the error log with warnings on the foreach every time bbPress is loaded.

Suggested (and tested) fix example:

// Load Plugins
if ( function_exists( 'glob' ) && is_callable( 'glob' ) && $glob=glob(BBPLUGINDIR . '_*.php') )
	foreach ( $glob as $_plugin )
do_action( 'bb_underscore_plugins_loaded' );

Change History (3)

#1 @sambauers
10 years ago

  • Milestone set to 0.8.4 & Pings
  • Owner set to sambauers

#2 @sambauers
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [1125]) Better glob validity testing. Fixes #787. Props _ck_

#3 @sambauers
10 years ago

(In [1126]) Better glob validity testing. See #787. Props _ck_

Also moving PHP version requirement to 4.3 in branches 0.8

Note: See TracTickets for help on using tickets.