Avoid checking an empty array when loading plugins
This commit is contained in:
parent
af30015e57
commit
85f6840768
@ -366,9 +366,12 @@ function yourls_load_plugins() {
|
||||
if( yourls_is_installing() OR yourls_is_upgrading() )
|
||||
return;
|
||||
|
||||
$active_plugins = yourls_get_option( 'active_plugins' );
|
||||
if( false === $active_plugins )
|
||||
return;
|
||||
|
||||
global $ydb;
|
||||
$ydb->plugins = array();
|
||||
$active_plugins = yourls_get_option( 'active_plugins' );
|
||||
|
||||
foreach( (array)$active_plugins as $key=>$plugin ) {
|
||||
if( yourls_validate_plugin_file( YOURLS_PLUGINDIR.'/'.$plugin ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user