From e10e7b7939c9ee92fb6c34560090f76044715735 Mon Sep 17 00:00:00 2001 From: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Date: Fri, 7 Dec 2018 23:06:07 +0100 Subject: [PATCH] Fixed Typo in YamlDiscovery.php (#9530) Hi, As far as I understand the code, it seems that array_reduce should be array_replace in this line, isn't it ? PipoCanaja DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [X] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply `, i.e `./scripts/github-apply 5926` After you are done testing, you can remove the changes with `./scripts/github-remove`. If there are schema changes, you can ask on discord how to revert. --- LibreNMS/Device/YamlDiscovery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibreNMS/Device/YamlDiscovery.php b/LibreNMS/Device/YamlDiscovery.php index 529fbdfe3a..33cf59d939 100644 --- a/LibreNMS/Device/YamlDiscovery.php +++ b/LibreNMS/Device/YamlDiscovery.php @@ -252,7 +252,7 @@ class YamlDiscovery } } - $skip_value_gt = array_reduce((array)$group_options['skip_value_gt'], (array)$yaml_item_data['skip_value_gt']); + $skip_value_gt = array_replace((array)$group_options['skip_value_gt'], (array)$yaml_item_data['skip_value_gt']); foreach ($skip_value_gt as $skip_value) { if ($value > $skip_value) { return true;