From fc56143a9da95eaa6f30300dbb1f4ddb22f7e300 Mon Sep 17 00:00:00 2001 From: Gilles Crettenand Date: Fri, 12 Jun 2015 15:23:03 +0200 Subject: [PATCH] avoid an exception when trying to display Help --- Lib/Help.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/Help.php b/Lib/Help.php index 6b89508..97d2792 100644 --- a/Lib/Help.php +++ b/Lib/Help.php @@ -7,7 +7,11 @@ use BSR\Lib\Formatter\Html; class Help { private static function func($ws, $func) { - $rm = new \ReflectionMethod($ws, $func); + try { + $rm = new \ReflectionMethod($ws, $func); + } catch(\ReflectionException $e) { + return ''; + } $doc = $rm->getDocComment(); $params = $rm->getParameters();