Skip to:
Content

Opened 6 years ago

Closed 6 years ago

Last modified 6 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: 0.8.3.1
Component: Back-end Keywords:
Cc:

Description

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 )
		require($_plugin);
unset($_plugin);
do_action( 'bb_underscore_plugins_loaded' );
unset($glob);

Change History (3)

comment:1 sambauers6 years ago

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

comment:2 sambauers6 years ago

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

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

comment:3 sambauers6 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.