From 249a48275ef08c2731ce28afc88330765c4ac326 Mon Sep 17 00:00:00 2001 From: Matt Harrison Date: Fri, 10 May 2019 11:55:17 -0400 Subject: [PATCH] make sure $hook_extra['plugins'] before using it. Also handle if $hook_extra['plugin'] is used. --- inc/Clean.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/Clean.php b/inc/Clean.php index 3ab7458..bf57045 100755 --- a/inc/Clean.php +++ b/inc/Clean.php @@ -154,7 +154,11 @@ public static function after_upgrade( $upgrader, $hook_extra ) { static::core_paths(); break; case 'plugin': - static::plugin_paths( $hook_extra['plugins'] ); + if ( isset( $hook_extra['plugins'] ) ) { + static::plugin_paths( $hook_extra['plugins'] ); + } elseif ( isset( $hook_extra['plugin'] ) ) { + static::plugin_paths( array( $hook_extra['plugin'] ) ); + } break; case 'theme': static::theme_paths( $hook_extra['themes'] );