From 62801532a7a086967abb7928c7c2758c9b5e288e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 15 Mar 2012 16:01:56 +0100 Subject: [PATCH] Add a protection for duplicate modules --- htdocs/admin/modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 636b7ee1c85..184e679e1fc 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -124,7 +124,7 @@ foreach ($modulesdir as $dir) if ($modName) { - if (in_array($modName,$modNameLoaded)) + if (! empty($modNameLoaded[$modName])) { $mesg="Error: Module ".$modName." was found twice: Into ".$modNameLoaded[$modName]." and ".$dir.". You probably have an old file on your disk.<br>"; dol_syslog($mesg, LOG_ERR); -- GitLab