Project

General

Profile

Actions

Bug #14364

open

APCUPSD unable to process date string

Added by Lloyd Collins about 1 year ago. Updated 6 months ago.

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

PHP_errors.log (1.45 KB) PHP_errors.log PHP error log Lloyd Collins, 05/09/2023 08:50 AM
apcupsd screenshot 1.png (110 KB) apcupsd screenshot 1.png Lloyd Collins, 06/24/2023 06:17 PM
clipboard-202307080145-bj3bd.png (14.3 KB) clipboard-202307080145-bj3bd.png Jordan G, 07/08/2023 06:45 AM
apctest battery date change 1.png (56.2 KB) apctest battery date change 1.png Lloyd Collins, 07/08/2023 07:42 AM
clipboard-202311111743-kyfno.png (246 KB) clipboard-202311111743-kyfno.png Jordan G, 11/11/2023 11:43 PM
Actions

Also available in: Atom PDF