Loading...
 
Skip to main content

Webcron Bug

Status
Closed
Subject
Webcron Bug
Version
26.x
Category
  • Error
Feature
Date and Time
Resolution status
Fixed or Solved
Submitted by
Cheatha
Lastmod by
Josue Zirimwabagabo
Rating
(0)
Description

I couldn't use Webcron in 26.2 on Debian 11.9 with PHP 8.2.12, my cronjobs didn't run which caused some problems. After calling the cron-URL I got an error.

I call:
Cron URL
Copy to clipboard
curl -6 -k https://tiki.exmaple.com/cron.php?token=cb64a63643d1500bb978e612597f5ae8
I get:
Error Message
Copy to clipboard
Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /var/www/html/cron.php:53 Stack trace: #0 {main} thrown in /var/www/html/cron.php on line 53

I can fix this by editing cron.php by changing
faulty code
Copy to clipboard
if ($last_cron_run + $cron_interval >= $start_time) {
to
working code
Copy to clipboard
if (strtotime($last_cron_run) + $cron_interval >= $start_time) {

After that the cronjobs were working again, calling the Webcron-URL resulted in a blank page.

Solution
Workaround
Importance
8
Easy to solve?
10 easy
Priority
80
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8603
Created
Monday 11 March, 2024 16:20:15 UTC
by Cheatha
LastModif
Tuesday 14 January, 2025 23:19:31 UTC


Show PHP error messages