Bug #13775
closedpfSense - Feature #13446: Upgrade PHP from 7.4 to 8.1
Status Traffic Totals PHP error on dev snapshots w/PHP 8.1
100%
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
Updated by Jim Pingle almost 2 years ago
- Copied from Bug #13774: PIMD Interfaces drop-down empty on dev snapshots w/PHP 8.1 added
Updated by Jim Pingle almost 2 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Fix committed, will be tomorrow's snapshots.
https://github.com/pfsense/FreeBSD-ports/commit/3aaece2348795bfd36b817e6e4d204cadb971abf
Updated by Ben Woods almost 2 years 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?
Updated by Jim Pingle almost 2 years 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.
Updated by Jim Pingle almost 2 years ago
- Status changed from Feedback to Resolved
Unable to replicate the errors on a current snapshot, so it appears to be fixed.
Updated by Ben Woods almost 2 years ago
Yep, agree - fixed for me on the latest snapshots.