cron.php error
4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 27, 2020 (RSS)
By gversion - April 24, 2020
Hello,
I am receiving the following error:
#482 - E_NOTICE: Trying to access array offset on value of type null
/public/cmsb/cron.php (line 109)
I think it can't get the date/time that the last cron job ran but I'm not sure and I can't see why this would be the case.
Could someone please help me figure out what the issue is?
Any help would be greatly appreciated.
Thank you,
Greg
By daniel - April 24, 2020
Hi Greg,
It looks like this is a new error in PHP 7.4. You can patch this by updating this line in /cmsb/cron.php (at or near line 109):
$jobLastRunTime = strtotime($jobLastLogRecord['createdDate']);
To this:
$jobLastRunTime = strtotime($jobLastLogRecord['createdDate']??false);
As well, a related issue in /cmsb/lib/menus/admin/backgroundTasks.php (at or near line 294):
echo prettyDate( $latestLog['createdDate'] );
can be replaced with:
echo prettyDate( $latestLog['createdDate']??false );
These fixes will also be included in the next release of CMSB, so you won't have to worry about these fixes being overwritten by future upgrades.
Let me know if I can help with anything else!
Thanks,
Technical Lead
interactivetools.com
By gversion - April 25, 2020
Hi Daniel,
Thanks for getting back to me on this.
Are you guys currently testing CMSB with PHP version 7.4? I'm thinking of holding off updating my server from 7.3 to 7.4 until you confirm it's safe for me to do so...
Thanks as always for the excellent support.
Regards,
Greg
By daniel - April 27, 2020
Hi Greg,
Are you guys currently testing CMSB with PHP version 7.4?
That's correct - we are hoping to get a version out soon that cleans up these notices, so in the meantime, we recommend folks stick with PHP 7.3 if they're able to do so.
Cheers,
Technical Lead
interactivetools.com