Actions
Bug #14364
openAPCUPSD unable to process date string
Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
apcupsd
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
23.01
Affected Architecture:
All
Description
Hi,
After upgrading on a new install from 2.6.0 to + v23.01 (on amd64 if relevant) I'm unable to use the apcupsd widget on the homepage because it can't parse the battery replacement date.
I get a crash report (attached) and the following text from the widget on the home page:
Fatal error: Uncaught Exception: Failed to parse time string (20/04/23) at position 0 (2): Unexpected character in /usr/local/www/widgets/widgets/apcupsd.widget.php:255 Stack trace: #0 /usr/local/www/widgets/widgets/apcupsd.widget.php(255): DateTime->__construct('20/04/23') #1 /usr/local/www/widgets/widgets/apcupsd.widget.php(341): compose_apc_contents('apcupsd-0') #2 {main} thrown in /usr/local/www/widgets/widgets/apcupsd.widget.php on line 255 PHP ERROR: Type: 1, File: /usr/local/www/widgets/widgets/apcupsd.widget.php, Line: 255, Message: Uncaught Exception: Failed to parse time string (20/04/23) at position 0 (2): Unexpected character in /usr/local/www/widgets/widgets/apcupsd.widget.php:255 Stack trace: #0 /usr/local/www/widgets/widgets/apcupsd.widget.php(255): DateTime->__construct('20/04/23') #1 /usr/local/www/widgets/widgets/apcupsd.widget.php(341): compose_apc_contents('apcupsd-0') #2 {main} thrown
Seems similar to #13970 to me however not the same and that bug is marked as "done" a few months ago.
Thanks!
Files
Actions