Browse Source

Add isset() as it can be an empty result

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
pull/4336/head
Lukas Reschke 9 years ago
parent
commit
511524c668
No known key found for this signature in database GPG Key ID: B9F6980CF6E759B1
  1. 2
      lib/private/AppFramework/Utility/ControllerMethodReflector.php

2
lib/private/AppFramework/Utility/ControllerMethodReflector.php

@ -48,7 +48,7 @@ class ControllerMethodReflector implements IControllerMethodReflector {
preg_match_all('/^\h+\*\h+@(?P<annotation>[A-Z]\w+)((?P<parameter>.*))?$/m', $docs, $matches);
foreach($matches['annotation'] as $key => $annontation) {
$annotationValue = $matches['parameter'][$key];
if($annotationValue[0] === '(' && $annotationValue[strlen($annotationValue) - 1] === ')') {
if(isset($annotationValue[0]) && $annotationValue[0] === '(' && $annotationValue[strlen($annotationValue) - 1] === ')') {
$cutString = substr($annotationValue, 1, -1);
$cutString = str_replace(' ', '', $cutString);
$splittedArray = explode(',', $cutString);

Loading…
Cancel
Save