mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Better message error report on CLI
This commit is contained in:
parent
326e611851
commit
79fc6167a9
|
|
@ -587,7 +587,11 @@ if ($checkifupgraderequired) {
|
|||
if (!getDolGlobalString('MAIN_NO_UPGRADE_REDIRECT_ON_LEVEL_3_CHANGE') || $rescomp < 3) {
|
||||
// We did not add "&& $rescomp < 3" because we want upgrade process for build upgrades
|
||||
dol_syslog("main.inc: database version ".$versiontocompare." is lower than programs version ".DOL_VERSION.". Redirect to install/upgrade page.", LOG_WARNING);
|
||||
header("Location: ".DOL_URL_ROOT."/install/index.php");
|
||||
if (php_sapi_name() === "cli") {
|
||||
print "main.inc: database version ".$versiontocompare." is lower than programs version ".DOL_VERSION.". Try to run upgrade process.\n";
|
||||
} else {
|
||||
header("Location: ".DOL_URL_ROOT."/install/index.php");
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user