mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Prevent function collisions with Laravel (#8166)
Make function call compatible drop insensitive starts_with and ends_with for now as they aren't needed.
This commit is contained in:
committed by
Neil Lathwood
parent
1ee7d51f7a
commit
b2762d9fa7
@@ -1069,12 +1069,12 @@ function is_port_valid($port, $device)
|
||||
$ifAlias = $port['ifAlias'];
|
||||
$ifType = $port['ifType'];
|
||||
|
||||
if (str_contains($ifDescr, Config::getOsSetting($device['os'], 'good_if'), true)) {
|
||||
if (str_i_contains($ifDescr, Config::getOsSetting($device['os'], 'good_if'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (Config::getCombined($device['os'], 'bad_if') as $bi) {
|
||||
if (str_contains($ifDescr, $bi, true)) {
|
||||
if (str_i_contains($ifDescr, $bi)) {
|
||||
d_echo("ignored by ifDescr: $ifDescr (matched: $bi)\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user