diff --git a/src/Graze/Monolog/Processor/FilterProcessor.php b/src/Graze/Monolog/Processor/FilterProcessor.php index eda3b04..ac7cd5a 100644 --- a/src/Graze/Monolog/Processor/FilterProcessor.php +++ b/src/Graze/Monolog/Processor/FilterProcessor.php @@ -52,7 +52,7 @@ public function __invoke(array $record) */ protected function filterValue(&$value, $key) { - if (in_array($key, $this->keys)) { + if (in_array($key, $this->keys, true)) { $value = $this->replacement; } } diff --git a/tests/unit/src/Graze/Monolog/Processor/FilterProcessorTest.php b/tests/unit/src/Graze/Monolog/Processor/FilterProcessorTest.php index 1f46590..1d923ed 100644 --- a/tests/unit/src/Graze/Monolog/Processor/FilterProcessorTest.php +++ b/tests/unit/src/Graze/Monolog/Processor/FilterProcessorTest.php @@ -42,6 +42,7 @@ public function testProcessorIgnoresArrays() $this->assertEquals('YOU CAN\'T HANDLE THE TRUTH', $result['apples']); $this->assertInternalType('array', $result['oranges']); + $this->assertEquals([1,2,3], $result['oranges']); } public function testProcessorWorksWithNullReplacementValue()