Skip to content

Commit

Permalink
Avoid checking an empty array when loading plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
ozh committed Sep 2, 2013
1 parent af30015 commit 85f6840
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/functions-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down

0 comments on commit 85f6840

Please sign in to comment.