From c441aa89db3876758277ca3f272f64c8c007219b Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Sat, 10 Jan 2015 18:19:44 +0100
Subject: [PATCH] Fixed: Avoid warning

---
 htdocs/core/modules/DolibarrModules.class.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index e25f4d0c715..8b636fd247f 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -748,6 +748,8 @@ abstract class DolibarrModules
 
         $err=0;
 
+        if (empty($this->const)) return 0;
+
         foreach ($this->const as $key => $value)
         {
             $name      = $this->const[$key][0];
@@ -816,6 +818,8 @@ abstract class DolibarrModules
 
         $err=0;
 
+        if (empty($this->const)) return 0;
+
         foreach ($this->const as $key => $value)
         {
             $name      = $this->const[$key][0];
-- 
GitLab