diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index a4065d89664..0d89e7480fc 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -759,8 +759,7 @@ class DolibarrModules $val = $this->const[$key][2]; $note = $this->const[$key][3]; $visible= $this->const[$key][4]; - $entity = $this->const[$key][5]; - + $entity = isset($this->const[$key][5])?$this->const[$key][5]:0; $entity = ((!empty($entity) || $entity == '0')?$entity:$conf->entity); $sql = "SELECT count(*)"; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index d64eaca922a..d95506115b5 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -292,7 +292,7 @@ else $conf->setValues($db); // Current version is $conf->global->MAIN_VERSION_LAST_UPGRADE // Version to install is DOL_VERSION - $dolibarrlastupgradeversionarray=preg_split('/[.-]/',$conf->global->MAIN_VERSION_LAST_UPGRADE); + $dolibarrlastupgradeversionarray=preg_split('/[.-]/',isset($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_UPGRADE:$conf->global->MAIN_VERSION_LAST_INSTALL); $dolibarrversiontoinstallarray=versiondolibarrarray(); }