diff --git a/src/Masking/FieldMasker.php b/src/Masking/FieldMasker.php index a8961b0..d3585f5 100644 --- a/src/Masking/FieldMasker.php +++ b/src/Masking/FieldMasker.php @@ -30,8 +30,12 @@ public function mask(array $data): array return $collector; } - private function handleString(string $key, string $value): string + private function handleString(string|int|float|bool $key, string $value): string { + if (! is_string($key)) { + $key = (string) $key; + } + static $lowerFields = null; if ($lowerFields === null) { $lowerFields = array_map('strtolower', $this->fields);