mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 15:33:44 +01:00
Added check for PHP version
Page stops loading and alert is shown if version less than 7.4
This commit is contained in:
parent
389a082fbc
commit
0d9416f481
@ -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 "<script type='text/javascript'>alert('My idlers requires PHP 7.4 as a minimum version. You have " . PHP_VERSION . " installed');</script>";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//Compare functions
|
||||
protected function compatibleComparesSelect()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user