diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 22f1c48276a..9a0c7c94570 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -5278,7 +5278,9 @@ function dol_print_error($db = '', $error = '', $errors = null)
print 'This website or feature is currently temporarly not available or failed after a technical error.
This may be due to a maintenance operation. Current status of operation ('.dol_print_date(dol_now(), 'dayhourrfc').') are on next line...
'."\n";
print $langs->trans("DolibarrHasDetectedError").'. ';
print $langs->trans("YouCanSetOptionDolibarrMainProdToZero");
- define("MAIN_CORE_ERROR", 1);
+ if (!defined("MAIN_CORE_ERROR")) {
+ define("MAIN_CORE_ERROR", 1);
+ }
}
dol_syslog("Error ".$syslog, LOG_ERR);
diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php
index c781fb49e17..4744ebf04fb 100644
--- a/htdocs/projet/index.php
+++ b/htdocs/projet/index.php
@@ -268,7 +268,7 @@ if ($resql) {
print '