Project

General

Profile

Actions

Regression #12337

closed

IPsec widget generates errors if no tunnels are defined

Added by Steve Wheeler about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
Dashboard
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Default
Affected Version:
Affected Architecture:
All

Description

If you click on the 'Tunnels' or 'Mobile' tabs in the widget and have no tunnels defined PHP errors are generated:

PHP Errors:
[03-Sep-2021 23:50:13 Europe/London] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/local/www/widgets/widgets/ipsec.widget.php on line 62
[03-Sep-2021 23:50:13 Europe/London] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/local/www/widgets/widgets/ipsec.widget.php on line 63
[03-Sep-2021 23:50:13 Europe/London] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/local/www/widgets/widgets/ipsec.widget.php on line 64
[03-Sep-2021 23:50:13 Europe/London] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/local/www/widgets/widgets/ipsec.widget.php on line 65

Tested:

2.6.0-DEVELOPMENT (amd64)
built on Fri Sep 03 01:10:34 EDT 2021
FreeBSD 12.2-STABLE

and
21.09-BETA (amd64)
built on Fri Sep 03 06:45:58 EDT 2021
FreeBSD 12.2-STABLE


Files

Actions #2

Updated by Jim Pingle about 3 years ago

  • Status changed from New to Pull Request Review
  • Assignee set to Viktor Gurov
Actions #3

Updated by Steve Wheeler about 3 years ago

This looks good. It prevents the PHP errors at shows no tunnels are configured.

Actions #4

Updated by Jim Pingle about 3 years ago

  • Status changed from Feedback to Resolved

No errors from the widget that I can see now:

  • No errors when there are no tunnels (P1 or P2)
  • No errors on any tab when there is a P1 but no P2
Actions #5

Updated by Jim Pingle about 3 years ago

  • Subject changed from IPSec widget generates errors is no tunnels are defined to IPsec widget generates errors if no tunnels are defined

Updating subject for release notes.

Actions #6

Updated by Jim Pingle about 3 years ago

  • Plus Target Version changed from 21.09 to 22.01
Actions

Also available in: Atom PDF