mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Only allow string offset assignment when offset is integer
This commit is contained in:
parent
cbaf050bd2
commit
050045209f
@ -329,7 +329,7 @@ class ArrayAssignmentAnalyzer
|
||||
}
|
||||
}
|
||||
|
||||
if ($type instanceof Type\Atomic\TString) {
|
||||
if ($type instanceof Type\Atomic\TString && is_int($key_value)) {
|
||||
$has_matching_string = true;
|
||||
|
||||
if ($type instanceof Type\Atomic\TLiteralString
|
||||
|
Loading…
Reference in New Issue
Block a user