Skip to content

Commit

Permalink
Stop using the GLOB_BRACE flag
Browse files Browse the repository at this point in the history
The `GLOB_BRACE` flag for `glob()` is not available on all systems. Most notably it's not supported on Solaris and Alpine (a quite popular lightweight linux distribution used mostly for running docker containers). On this PR I propose a way of achieving the same result which doesn't use such flag and hence improves compatibility.
  • Loading branch information
MZAWeb committed Jul 1, 2016
1 parent 80092f1 commit 29a24e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tribe/Main.php
Expand Up @@ -4497,7 +4497,7 @@ protected function init_autoloading() {
$autoloader->register_prefixes( $prefixes );

// deprecated classes are registered in a class to path fashion
foreach ( glob( $this->plugin_path . '{common/src,src}/deprecated/*.php', GLOB_BRACE ) as $file ) {
foreach ( array_merge( glob( $this->plugin_path . 'common/src/deprecated/*.php' ), glob( $this->plugin_path . 'src/deprecated/*.php' ) ) as $file ) {
$class_name = str_replace( '.php', '', basename( $file ) );
$autoloader->register_class( $class_name, $file );
}
Expand Down

0 comments on commit 29a24e5

Please sign in to comment.