From 6a9cadd9d4d753fbac4617e0366cabb98acc16a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Sep 2020 11:09:20 +0200 Subject: [PATCH] Removed warning --- htdocs/filefunc.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index d9f3d3a14c3..8912fd2a299 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -276,8 +276,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; //print memory_get_usage(); -// If password is encoded, we decode it -if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) +// If password is encoded, we decode it. Note: When page is called for install, $dolibarr_main_db_pass may not be defined yet. +if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) { if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) {