diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-09-11 08:39:42 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-09-11 08:40:06 +0300 |
commit | 75197fa7cf973487fd4735e0ca5b7075e3598d61 (patch) | |
tree | 5706d6581387ec842267f6c11f78534e8625ad97 /lib | |
parent | b620bb79812c996fdbf1ac3896b50d781886d5d7 (diff) |
Do not fail un undefined section
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Detail.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Detail.php b/lib/Detail.php index 935ed3f..ddb2b22 100644 --- a/lib/Detail.php +++ b/lib/Detail.php @@ -55,8 +55,9 @@ class Detail implements IDetail { public function getInformation() { /** @var IRequest $request */ $request = \OC::$server->query(IRequest::class); - if ($request->getParam('details')) { - return $request->getParam('details')[$this->getSection()][$this->getIdentifier()]; + $request = $request->getParam('details'); + if ($request && isset($request[$this->getSection()][$this->getIdentifier()])) { + return $request[$this->getSection()][$this->getIdentifier()]; } return $this->information; } @@ -68,4 +69,4 @@ class Detail implements IDetail { public function getIdentifier() { return $this->identifier; } -}
\ No newline at end of file +} |