mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
parent
dca8bf9d36
commit
0ea22e8d82
@ -339,6 +339,10 @@ class Reconciler
|
||||
if (($new_var_type === 'isset' && !$is_negation)
|
||||
|| ($new_var_type === 'empty' && $is_negation)
|
||||
) {
|
||||
if ($key === '$_SESSION') {
|
||||
return Type::getArray();
|
||||
}
|
||||
|
||||
return Type::getMixed($inside_loop);
|
||||
}
|
||||
|
||||
|
@ -511,6 +511,10 @@ class IssetTest extends TestCase
|
||||
'assertions' => [],
|
||||
'error_levels' => ['MixedAssignment', 'MixedArrayOffset', 'InvalidArrayOffset'],
|
||||
],
|
||||
'sessionNullCoalesce' => [
|
||||
'<?php
|
||||
$a = $_SESSION ?? [];'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user