From 83bf77c2b4a37005e252d16cddf426b8ac9d5629 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sat, 7 Oct 2023 16:34:31 +0200 Subject: [PATCH] fix(AdminController): Catch failed cpuinfo readfile fixes #964 Signed-off-by: Marcel Klehr --- lib/Controller/AdminController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/AdminController.php b/lib/Controller/AdminController.php index fa7cf6f4..bb29efdd 100644 --- a/lib/Controller/AdminController.php +++ b/lib/Controller/AdminController.php @@ -151,7 +151,7 @@ public function avx(): JSONResponse { } catch (\Throwable $e) { return new JSONResponse(['avx' => null]); } - return new JSONResponse(['avx' => strpos($cpuinfo, 'avx') !== false]); + return new JSONResponse(['avx' => $cpuinfo !== false && strpos($cpuinfo, 'avx') !== false]); } public function platform(): JSONResponse {