Skip to content

Commit

Permalink
makes $_SESSION possibly undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Nov 4, 2021
1 parent fffef80 commit 6e5f3db
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ public static function scrapeAssertions(
&& !$var_type->isMixed()
&& !$var_type->possibly_undefined
&& !$var_type->possibly_undefined_from_try
&& $var_name !== '$_SESSION'
) {
$if_types[$var_name] = [['!null']];
} else {
Expand Down
1 change: 0 additions & 1 deletion src/Psalm/Internal/Type/NegatedAssertionReconciler.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public static function reconcile(
if (!$existing_var_type->isNullable()
&& $key
&& strpos($key, '[') === false
&& $key !== '$_SESSION'
) {
foreach ($existing_var_type->getAtomicTypes() as $atomic) {
if (!$existing_var_type->hasMixed()
Expand Down
1 change: 0 additions & 1 deletion src/Psalm/Internal/Type/SimpleAssertionReconciler.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ private static function reconcileIsset(
$did_remove_type = ($key && strpos($key, '['))
|| !$existing_var_type->initialized
|| $existing_var_type->possibly_undefined
|| $key === '$_SESSION'
|| $existing_var_type->ignore_isset;

if ($existing_var_type->isNullable()) {
Expand Down

0 comments on commit 6e5f3db

Please sign in to comment.