Skip to content

Commit

Permalink
Make http_response_header possibly undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffycondor committed Dec 25, 2022
1 parent 69da58d commit af82835
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -612,7 +612,10 @@ private static function getGlobalTypeInner(string $var_id, bool $files_full_path
}

if ($var_id === '$http_response_header') {
return Type::getNonEmptyList(Type::getNonFalsyString());
$list = Type::getNonEmptyList(Type::getNonFalsyString());
// $http_response_header exists only in the local scope after a successful network request
$list->possibly_undefined = true;
return $list;
}

if ($var_id === '$GLOBALS') {
Expand Down

0 comments on commit af82835

Please sign in to comment.