From 2dfd8f33ef84f05460a7f18206b76f335d2ca251 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Jun 2026 23:50:44 +0200 Subject: [PATCH] Check PHP min version --- htdocs/core/modules/modBlockedLog.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php index 89aa34d5f2c..cbe0b106e15 100644 --- a/htdocs/core/modules/modBlockedLog.class.php +++ b/htdocs/core/modules/modBlockedLog.class.php @@ -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)]);