Todo #14790
closed
Eliminate direct config access in ``interfaces.php``
Added by Jim Pingle 11 months ago.
Updated 9 months ago.
Plus Target Version:
23.09
Description
The code in interfaces.php
needs updated for PHP 8.x and to use the new config/array access functions. There have been a couple changes made already but the rest of the file needs to be converted.
Adding this for better tracking/testing feedback, the work is already done and there will be an MR shortly.
- Related to Bug #14579: PHP error in ``handle_wireless_post()`` when toggling some wireless interface options added
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
- Status changed from Feedback to In Progress
PHP error when disabling an interface:
[20-Sep-2023 13:28:16 Etc/UTC] PHP Fatal error: Uncaught TypeError: array_get_path(): Argument #1 ($arr) must be of type array, null given, called in /usr/local/www/interfaces.php on line 472 and defined in /etc/inc/util.inc:3562
Stack trace:
#0 /usr/local/www/interfaces.php(472): array_get_path(NULL, 'ipaddrv6')
#1 {main}
thrown in /etc/inc/util.inc on line 3562
- Status changed from In Progress to Feedback
Tested disabling an interface on the latest builds. No PHP errors were present and the changeset above was present in the interfaces.php file. Can be closed as Resolved.
Kris Phillips wrote in #note-6:
Tested disabling an interface on the latest builds. No PHP errors were present and the changeset above was present in the interfaces.php file. Can be closed as Resolved.
That one issue is solved but in general it needs more testing with different interface types. There was at least one report of a PHP error with a PPPoE interface that I saw on Slack but it hasn't made its way here yet with details about how to replicate it.
I've been trying to run interfaces.php
through all sorts of different scenarios and so far I have yet to break it on a current snapshot. I've tried making a new PPPoE interface when no others were defined (Even after deleting the whole <ppps>
tag from the config, changing types, different settings, same settings... All seems to be OK. If anyone has seen an error or knows a way to trigger a PHP error on there, let me know.
I'll still leave this open for the moment for additional feedback since there are so many possible different interface settings combinations it's unlikely I tested even a majority of possible states.
- Status changed from Feedback to Resolved
No further errors have popped up so we'll call this complete for now. Any new errors can be addressed individually as separate issues.
- Target version changed from 2.8.0 to 2.7.1
Also available in: Atom
PDF