Project

General

Profile

Actions

Regression #12337

closed
SW VG

IPsec widget generates errors if no tunnels are defined

Regression #12337: IPsec widget generates errors if no tunnels are defined

Added by Steve Wheeler about 5 years ago. Updated almost 5 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

JP Updated by Jim Pingle about 5 years ago Actions #2

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

SW Updated by Steve Wheeler about 5 years ago Actions #3

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

JP Updated by Jim Pingle about 5 years ago Actions #4

  • 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

JP Updated by Jim Pingle about 5 years ago Actions #5

  • 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.

JP Updated by Jim Pingle almost 5 years ago Actions #6

  • Plus Target Version changed from 21.09 to 22.01
Actions

Also available in: Atom