Skip to content

Commit

Permalink
fix(AdminController): Catch failed cpuinfo readfile
Browse files Browse the repository at this point in the history
fixes #964

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Oct 7, 2023
1 parent 9292620 commit 83bf77c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 83bf77c

Please sign in to comment.