-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
Description
Description
The isDateOk() function has two bugs:
-
Line ~1041:
$maxDateValue = $minDateValue->modify('+6 year')->format(...)modify()modifies the object in place and returns it- So $maxDateValue becomes a DateTime object, not a string
- This causes "Object of class DateTime could not be converted to string" error in the log line
-
The hardcoded +6 year limit from 2020 means the check fails starting January 1st, 2026
Fix:
- Line 1041: Use
(clone $minDateValue)->modify('+6 year')to avoid modifying the original object - Increase to +10 years or make it dynamic
- Line 1047: Add
->format('Y-m-d')to $minDateValue in the log message
Type de matériel / Hardware type
Autre / Other
Version de Jeedom / Jeedom Version
4.5.2
Navigateur / Browser
No response
Étapes pour reproduire / Steps to reproduce
0000|[2026-01-01 00:00:25] ERROR : Erreur sur jeedom::cron() : Object of class DateTime could not be converted to string
Logs
No response