#787 closed defect (bug) (fixed)
'glob' returns FALSE on some PHP installs causing foreach error
| Reported by: | _ck_ | Owned by: | sambauers |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | Back-end | Version: | 0.8.3.1 |
| Severity: | normal | 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)
Note:
See TracTickets
for help on using tickets.
(In [1125]) Better glob validity testing. Fixes #787. Props _ck_