From e83cfcef36555a0ab2bf7ef257441850f89aedc4 Mon Sep 17 00:00:00 2001 From: tokul Date: Tue, 4 Oct 2005 06:27:18 +0000 Subject: [PATCH] explaining $plugins tests git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10131 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/plugin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions/plugin.php b/functions/plugin.php index 0b50ce39..280e4146 100644 --- a/functions/plugin.php +++ b/functions/plugin.php @@ -198,6 +198,11 @@ function soupNazi(){ function is_plugin_enabled($plugin_name) { global $plugins; + /** + * check if variable is set. can't do is_array(), if variable is not set + * check if it is an array + * there is no need to call in_array() if $plugins array is empty + */ if (! isset($plugins) || ! is_array($plugins) || empty($plugins)) return false; -- 2.25.1