Skip to content

Commit 402cc3f

Browse files
staabmondrejmirtes
authored andcommitted
Fix "Using null as an array offset is deprecated, use an empty string instead"
1 parent 84b2cf8 commit 402cc3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Analyser/TypeSpecifierContext.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ private function __construct(private ?int $value)
2727

2828
private static function create(?int $value): self
2929
{
30-
self::$registry[$value] ??= new self($value);
31-
return self::$registry[$value ?? ''];
30+
$key = $value ?? '';
31+
self::$registry[$key] ??= new self($value);
32+
return self::$registry[$key];
3233
}
3334

3435
public static function createTrue(): self

0 commit comments

Comments
 (0)