Project

General

Profile

Actions

Bug #13775

closed

pfSense - Feature #13446: Upgrade PHP from 7.4 to 8.1

Status Traffic Totals PHP error on dev snapshots w/PHP 8.1

Added by Jim Pingle over 1 year ago. Updated over 1 year ago.

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

100%

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

Description

Status Traffic Totals has a problem generating its interface list, and it appears to be from needing to be updated for PHP 8.1.

vnstat_portlist() uses the old style of code to gather OpenVPN interfaces which is definitely wrong for PHP 8.1 at a minimum.

PHP ERROR: Type: 1, File: /usr/local/pkg/status_traffic_totals.inc, Line: 189, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/status_traffic_totals.inc:189
Stack trace:
#0 /usr/local/pkg/status_traffic_totals.inc(76): vnstat_portlist()
#1 /usr/local/pkg/status_traffic_totals.inc(226): vnstat_create_nic_dbs()
#2 /etc/inc/pkg-utils.inc(707) : eval()'d code(1): vnstat_sync()
#3 /etc/inc/pkg-utils.inc(707): eval()
#4 /etc/rc.start_packages(66): sync_package('Traffic Totals')
#5 {main}
thrown @ 2022-12-18 07:29:54

Related issues

Copied from Bug #13774: PIMD Interfaces drop-down empty on dev snapshots w/PHP 8.1ResolvedJim Pingle

Actions
Actions #1

Updated by Jim Pingle over 1 year ago

  • Copied from Bug #13774: PIMD Interfaces drop-down empty on dev snapshots w/PHP 8.1 added
Actions #2

Updated by Jim Pingle over 1 year ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Ben Woods over 1 year ago

Thanks for the quick fix - I’ll test it once it’s released tomorrow.

Out of curiosity, is it the same suite of packages used on both the stable and devel branches, and if so how do you ensure that changes like that don’t break the package on the 2.6.0 stable release?

Actions #4

Updated by Jim Pingle over 1 year ago

Ben Woods wrote in #note-3:

Out of curiosity, is it the same suite of packages used on both the stable and devel branches, and if so how do you ensure that changes like that don’t break the package on the 2.6.0 stable release?

No, they are different branches and we do not automatically copy changes from one to the other.

Actions #5

Updated by Jim Pingle over 1 year ago

  • Status changed from Feedback to Resolved

Unable to replicate the errors on a current snapshot, so it appears to be fixed.

Actions #6

Updated by Ben Woods over 1 year ago

Yep, agree - fixed for me on the latest snapshots.

Actions

Also available in: Atom PDF