From 135ceb4a9de2238c1678577b5f3d34c6a9f66a8b Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 18 Aug 2020 11:57:01 +0200 Subject: Fix late night errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/dashboard/lib/Service/BackgroundService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/dashboard/lib/Service/BackgroundService.php') diff --git a/apps/dashboard/lib/Service/BackgroundService.php b/apps/dashboard/lib/Service/BackgroundService.php index 2b59bef65d9..30e9d9fe3cb 100644 --- a/apps/dashboard/lib/Service/BackgroundService.php +++ b/apps/dashboard/lib/Service/BackgroundService.php @@ -107,7 +107,7 @@ class BackgroundService { } public function setShippedBackground($fileName) { - if (!in_array($fileName, self::SHIPPED_BACKGROUNDS)) { + if (!array_key_exists($fileName, self::SHIPPED_BACKGROUNDS)) { throw new \InvalidArgumentException('The given file name is invalid'); } $this->config->setUserValue($this->userId, 'dashboard', 'background', $fileName); -- cgit v1.2.3