Project

General

Profile

Actions

Regression #13950

closed

PHP error with pfBlockerNG

Added by Marcos M about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
pfBlockerNG
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.7.0
Affected Plus Version:
23.01
Affected Architecture:

Description

After restoring a config backup which contains pfBlockerNG-devel to a fresh install of 23.01, a crash/alert shows the following PHP error:

PHP ERROR: Type: 1, File: /usr/local/www/pfblockerng/pfblockerng.php, Line: 1980, Message: Uncaught TypeError: sort(): Argument #1 ($array) must be of type array, null given in /usr/local/www/pfblockerng/pfblockerng.php:1980
Stack trace:
#0 /usr/local/www/pfblockerng/pfblockerng.php(1980): sort(NULL, 2)
#1 /usr/local/pkg/pfblockerng/pfblockerng_install.inc(40): pfblockerng_get_countries()
#2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): include_once('/usr/local/pkg/...')
#3 /etc/inc/pkg-utils.inc(781): eval()
#4 /etc/inc/pkg-utils.inc(899): eval_once('include_once('/...')
#5 /etc/rc.packages(76): install_package_xml('pfBlockerNG-dev...')
#6 {main}
thrown @ 2023-02-12 19:51:26

It did not appear to prevent pfBlockerNG from functioning correctly, but I noticed that <include_file>/usr/local/pkg/pfblockerng/pfblockerng.inc</include_file> was missing from config.xml. Uninstalling -devel then installing the non-devel package did not result in any issues.

Actions

Also available in: Atom PDF