Check PHP min version

This commit is contained in:
Laurent Destailleur 2026-06-19 23:50:44 +02:00
parent aa5cd96de6
commit 2dfd8f33ef

View file

@ -174,6 +174,14 @@ class modBlockedLog extends DolibarrModules
$sql = array();
// Detect minimal version of PHP
if (version_compare(PHP_VERSION, '7.0.0') < 0) {
$errmsg = 'Error: You are using a too low version of PHP';
dol_syslog($errmsg, LOG_ERR);
$this->error = $errmsg;
return 0;
}
// Clear cache
unset($_SESSION['obfuscationkey_'.((int) $conf->entity)]);
unset($conf->cache['obfuscationkey_'.((int) $conf->entity)]);