avoid an exception when trying to display Help

This commit is contained in:
Gilles Crettenand
2015-06-12 15:23:03 +02:00
parent 8bfd07b90f
commit fc56143a9d

View File

@@ -7,7 +7,11 @@ use BSR\Lib\Formatter\Html;
class Help { class Help {
private static function func($ws, $func) { private static function func($ws, $func) {
$rm = new \ReflectionMethod($ws, $func); try {
$rm = new \ReflectionMethod($ws, $func);
} catch(\ReflectionException $e) {
return '';
}
$doc = $rm->getDocComment(); $doc = $rm->getDocComment();
$params = $rm->getParameters(); $params = $rm->getParameters();