From 75197fa7cf973487fd4735e0ca5b7075e3598d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 11 Sep 2020 07:39:42 +0200 Subject: Do not fail un undefined section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Detail.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') 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 +} -- cgit v1.2.3