From 0d9416f4816c6f63beaeecbf326f8e73a8d52639 Mon Sep 17 00:00:00 2001 From: cp6 Date: Wed, 3 Feb 2021 00:29:26 +1100 Subject: [PATCH] Added check for PHP version Page stops loading and alert is shown if version less than 7.4 --- class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/class.php b/class.php index 020b023..0aebf28 100644 --- a/class.php +++ b/class.php @@ -2100,6 +2100,7 @@ class idlers extends helperFunctions public function mainPage() { + $this->checkPHPversion();//Check PHP version. Wont load if not PHP 7.4 or above $this->pageHead(); $this->pageContents(); $this->pageFooter(); @@ -3154,6 +3155,14 @@ class idlers extends helperFunctions return $id; } + protected function checkPHPversion() + { + if (version_compare(PHP_VERSION, '7.4') === -1) { + echo ""; + exit; + } + } + //Compare functions protected function compatibleComparesSelect() {