define( $name, $val );
}
foreach ( $info['autoloaderPaths'] as $path ) {
- require_once $path;
+ if ( file_exists( $path ) ) {
+ require_once $path;
+ }
}
$this->loaded += $info['credits'];
}
foreach ( $info['callbacks'] as $name => $cb ) {
+ if ( !is_callable( $cb ) ) {
+ if ( is_array( $cb ) ) {
+ $cb = '[ ' . implode( ', ', $cb ) . ' ]';
+ }
+ throw new UnexpectedValueException( "callback '$cb' is not callable" );
+ }
call_user_func( $cb, $info['credits'][$name] );
}
}