fixes for PHP 7.3

Dieser Commit ist enthalten in:
Oldperl 2019-02-07 12:09:29 +00:00
Ursprung 95a99f9166
Commit 7115778524
3 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,6 @@
<?php
if (!function_exists('is_countable')) {
function is_countable($var) {
return (is_array($var) || $var instanceof Countable);
}
}

Datei anzeigen

@ -405,6 +405,9 @@ function parseCronFile($PC_cronTabFile, $PC_debug) {
$file = @file($PC_cronTabFile);
$job = Array();
$jobs = Array();
if(!is_countable($file)) {
return $jobs;
}
for ($i = 0; $i < count($file); $i++) {
if ($file[$i][0] != '#') {
// old regex, without dow abbreviations:

Datei anzeigen

@ -78,6 +78,9 @@ if (!defined('CL_VERSION')) {
// fixed functions for PHP 5.4 and later
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
include_once(str_replace('\\', '/', realpath(dirname(__FILE__) . '/..')) . '/classes/class.security.php');
try {