diff --git a/lib/ReflectionClosure.php b/lib/ReflectionClosure.php index 52bdfb6..efa394b 100644 --- a/lib/ReflectionClosure.php +++ b/lib/ReflectionClosure.php @@ -287,7 +287,7 @@ public function getCode() if ($name[0] == '\\' || ($selfOrStatic = ($name == 'static' || $name == 'self'))) { $code .= $buffer . ($is_array ? $token[1] : $token); - if($selfOrStatic){ + if(isset($selfOrStatic) && $selfOrStatic){ $isUsingScope = true; } } elseif ($new_key_word || ($is_array && ($token[0] == T_VARIABLE || $token[0] == T_DOUBLE_COLON))) {