Fix: avoid error during update if db port not defined

This commit is contained in:
Regis Houssin 2015-10-01 12:35:38 +02:00
parent c7e05d2473
commit 1c023e291c

View File

@ -83,6 +83,7 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile))
if ($result)
{
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // For backward compatibility
if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type='mysqli' || $dolibarr_main_db_type='mysql')) $dolibarr_main_db_port='3306'; // For backward compatibility
// Clean parameters
$dolibarr_main_data_root =isset($dolibarr_main_data_root)?trim($dolibarr_main_data_root):'';