Skip to content

Commit 0074ea9

Browse files
committed
avoid crashing on PHP before 7.4
1 parent 5c4be20 commit 0074ea9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/simplesaml.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ class simplesaml extends phplistPlugin
3333

3434
function __construct()
3535
{
36-
require_once(__DIR__ .'/simplesaml/simplesamlphp/lib/_autoload.php');
36+
if ( version_compare(PHP_VERSION, '7.4.0') >= 0) {
37+
require_once(__DIR__ .'/simplesaml/simplesamlphp/lib/_autoload.php');
38+
}
3739
parent::__construct();
3840
}
3941

@@ -268,6 +270,9 @@ public function logout()
268270

269271
public function dependencyCheck()
270272
{
273+
if ( version_compare(PHP_VERSION, '7.4.0') < 0) {
274+
return array('PHP version 7.4 or up' ,false);
275+
}
271276

272277
$allowEnable = false;
273278
if (@is_file(__DIR__).'/simplesaml/simplesamlphp/config/config.php') {

0 commit comments

Comments
 (0)