Skip to content

Commit 997fce4

Browse files
authored
Merge pull request #103 from agustingomes/issues/102
Fix deprecation when passing `null` as first parameter to `array_key_exists`
2 parents 01945bf + e06bd77 commit 997fce4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/quality-assurance.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
with:
2121
php-version: ${{ matrix.php }}
2222
coverage: xdebug
23+
ini-values: error_reporting=E_ALL
2324
tools: composer:v2
2425
- run: composer install --no-progress ${{ matrix.composer-flags }}
2526
- run: vendor/bin/phpunit ${{ matrix.phpunit-flags }}

src/Formatter/ArrayBasedDeformatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function deserializeObject(mixed $decoded, Field $field, Deserializer $de
236236
first(static fn (string $name): bool => isset($decoded[$name]))
237237
);
238238

239-
if (!array_key_exists($key, $decoded)) {
239+
if ($key === null || !array_key_exists($key, $decoded)) {
240240
return DeformatterResult::Missing;
241241
}
242242

0 commit comments

Comments
 (0)