mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
interfaces, raw config access, leading to PHP Warning: Illegal string offset 'if', see https://github.com/opnsense/core/issues/3231
This commit is contained in:
parent
9d3002cabb
commit
c6f8c46709
@ -3437,14 +3437,15 @@ function convert_real_interface_to_friendly_interface_name($interface = 'wan')
|
||||
}
|
||||
|
||||
// search direct
|
||||
foreach ($config['interfaces'] as $if => $ifname) {
|
||||
$all_interfaces = legacy_config_get_interfaces();
|
||||
foreach ($all_interfaces as $if => $ifname) {
|
||||
if ($if == $interface || $ifname['if'] == $interface) {
|
||||
return $if;
|
||||
}
|
||||
}
|
||||
|
||||
// search related
|
||||
foreach ($config['interfaces'] as $if => $ifname) {
|
||||
foreach ($all_interfaces as $if => $ifname) {
|
||||
if (get_real_interface($if) == $interface) {
|
||||
return $if;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user