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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user