Mild improvement in plugin detection
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 7 Dec 2021 19:27:22 +0000 (19:27 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 7 Dec 2021 19:27:22 +0000 (19:27 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14935 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/configtest.php

index 7f1ce94b7fcfb2cef4508a1ce2f0be5fb7f63143..de9fb5e074ab41e692e4286258c75b1ffa48b9c7 100644 (file)
@@ -455,7 +455,7 @@ $bad_plugins = array(
         'xmailer'                 // Integrated into SquirrelMail 1.2 core
         );
 
-if (isset($plugins[0])) {
+if (!empty($plugins) && is_array($plugins)) {
     foreach($plugins as $plugin) {
         if(!file_exists(SM_PATH .'plugins/'.$plugin)) {
             do_err('You have enabled the <i>'.$plugin.'</i> plugin, but I cannot find it.', FALSE);
@@ -559,7 +559,7 @@ if (isset($plugins[0])) {
         echo $IND . "Plugins OK.<br />\n";
     }
 } else {
-    echo $IND . "Plugins are not enabled in config.<br />\n";
+    echo $IND . "Plugins are not correctly enabled in the configuration file.<br />\n";
 }
 foreach($theme as $thm) {
     if(!file_exists($thm['PATH'])) {