From cd2f8e7d657cc9f3f2b0450731e5e474c54caaed Mon Sep 17 00:00:00 2001 From: Brown Date: Mon, 11 Nov 2019 16:56:44 -0500 Subject: [PATCH] Fix memory corruption --- src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php index 71f2046ff..65afdd1cb 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php @@ -109,7 +109,7 @@ class TryAnalyzer if (!isset($try_context->vars_in_scope[$var_id])) { $try_context->vars_in_scope[$var_id] = clone $type; $try_context->vars_in_scope[$var_id]->from_docblock = true; - $type->possibly_undefined_from_try = true; + $try_context->vars_in_scope[$var_id]->possibly_undefined_from_try = true; } else { $try_context->vars_in_scope[$var_id] = Type::combineUnionTypes( $try_context->vars_in_scope[$var_id],