diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-04-12 21:37:10 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-04-13 12:00:17 +0200 |
commit | 511524c6681734fcee55d02f89de4129bbf69704 (patch) | |
tree | 193617e64b148d7eb8472790064ac4caa1999ee6 | |
parent | d729bde98c85207efdcae39429603d9226b13f4e (diff) | |
download | nextcloud-server-511524c6681734fcee55d02f89de4129bbf69704.tar.gz nextcloud-server-511524c6681734fcee55d02f89de4129bbf69704.zip |
Add isset() as it can be an empty result
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
-rw-r--r-- | lib/private/AppFramework/Utility/ControllerMethodReflector.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php index 19eafdb25ac..d6a9b596127 100644 --- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php +++ b/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); |