1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 09:34:54 +02:00

Fixes #5091 Fixes PHP Notices/Warnings and sends some cron execution errors to error_log.

This commit is contained in:
camer0n
2023-10-25 18:01:17 -07:00
parent 64cf23a06e
commit 4467ad32b8
3 changed files with 23 additions and 3 deletions

View File

@@ -1080,10 +1080,18 @@ class cronScheduler
if(!$valid)
{
if($this->debug)
{
error_log('e107: Invalid token used for cron class');
}
return false;
}
@file_put_contents(e_CACHE . 'cronLastLoad.php', time());
if(!@file_put_contents(e_CACHE . 'cronLastLoad.php', time()))
{
error_log('e107: Unable to write to: '.e_CACHE . 'cronLastLoad.php. Permissions issue?');
}
// Get active cron jobs.
$cron_jobs = $this->getCronJobs(true);
@@ -1260,6 +1268,11 @@ class cronScheduler
$pwd = str_replace('token=', '', $pwd);
}
if($this->debug)
{
error_log("Cron Token: ".$pwd, E_NOTICE);
}
if(empty($this->pref['e_cron_pwd']) || (varset($this->pref['e_cron_pwd']) != $pwd))
{
if(!empty($pwd))