Skip to content
Snippets Groups Projects
Commit 20ec0142 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

prevent type error for class doc blocks, re #2494

parent feb4168e
No related branches found
No related tags found
No related merge requests found
......@@ -964,8 +964,14 @@ abstract class RouteMap
public function getRoutes($http_method = null)
{
$ref = new \ReflectionClass($this);
$docblock = new Docblock($ref);
$class_conditions = $this->extractConditions($docblock);
if ($ref->getDocComment()) {
$docblock = new Docblock($ref);
$class_conditions = $this->extractConditions($docblock);
} else {
$class_conditions = [];
}
// Create result array by creating an associative array from all
// supported methods as keys
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment