Update status.cron.php

In my enviroment ( Apache + PHP 8 ) the script breaks at this line. With this Version check it works well.
This commit is contained in:
Christian Rüggeberg 2023-03-31 16:50:39 +02:00 committed by GitHub
parent 04a4d959fd
commit 85a6e6ae71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ namespace {
// define won't accept array before php 7.0.0
// check if data is serialized (not needed when using php 7.0.0 and higher)
$data = @unserialize(PSM_CRON_ALLOW);
$data = (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 7) ? false : @unserialize(PSM_CRON_ALLOW);
$allow = $data === false ? PSM_CRON_ALLOW : $data;
if (!in_array($_SERVER['REMOTE_ADDR'], $allow) && !in_array($_SERVER["HTTP_X_FORWARDED_FOR"], $allow)