From 7e65e13d6950c51feb794d97fe99f9d7ea9bb20c Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Fri, 8 Jan 2016 18:31:31 -0500 Subject: [PATCH] Be explicit about use vars in closure --- lib/ClosureChecker.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ClosureChecker.php b/lib/ClosureChecker.php index 5c7b4e90f..bbc18a119 100644 --- a/lib/ClosureChecker.php +++ b/lib/ClosureChecker.php @@ -8,10 +8,11 @@ class ClosureChecker extends FunctionChecker { public function check() { + $use_vars = []; foreach ($this->_function->uses as $use) { - $this->_declared_variables[$use->var] = 1; + $use_vars[$use->var] = true; } - parent::check(); + parent::check($use_vars); } }