fixes for PHP 7.3
Dieser Commit ist enthalten in:
Ursprung
95a99f9166
Commit
7115778524
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
if (!function_exists('is_countable')) {
|
||||||
|
function is_countable($var) {
|
||||||
|
return (is_array($var) || $var instanceof Countable);
|
||||||
|
}
|
||||||
|
}
|
|
@ -405,6 +405,9 @@ function parseCronFile($PC_cronTabFile, $PC_debug) {
|
||||||
$file = @file($PC_cronTabFile);
|
$file = @file($PC_cronTabFile);
|
||||||
$job = Array();
|
$job = Array();
|
||||||
$jobs = Array();
|
$jobs = Array();
|
||||||
|
if(!is_countable($file)) {
|
||||||
|
return $jobs;
|
||||||
|
}
|
||||||
for ($i = 0; $i < count($file); $i++) {
|
for ($i = 0; $i < count($file); $i++) {
|
||||||
if ($file[$i][0] != '#') {
|
if ($file[$i][0] != '#') {
|
||||||
// old regex, without dow abbreviations:
|
// old regex, without dow abbreviations:
|
||||||
|
|
|
@ -78,6 +78,9 @@ if (!defined('CL_VERSION')) {
|
||||||
// fixed functions for PHP 5.4 and later
|
// fixed functions for PHP 5.4 and later
|
||||||
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/includes/functions.php54.php');
|
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/includes/functions.php54.php');
|
||||||
|
|
||||||
|
// simulate PHP 7.3 functions
|
||||||
|
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/includes/functions.php73.php');
|
||||||
|
|
||||||
// 1. security check: Include security class and invoke basic request checks
|
// 1. security check: Include security class and invoke basic request checks
|
||||||
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/classes/class.security.php');
|
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/classes/class.security.php');
|
||||||
try {
|
try {
|
||||||
|
|
Laden…
In neuem Issue referenzieren