diff --git a/changelog/57_UNRELEASED_2020-xx-xx.md b/changelog/57_UNRELEASED_2020-xx-xx.md index a1e9d657..b8f0e1ed 100644 --- a/changelog/57_UNRELEASED_2020-xx-xx.md +++ b/changelog/57_UNRELEASED_2020-xx-xx.md @@ -2,4 +2,5 @@ - Fixed a PHP notice on the recipes page when there are no recipes (thanks @mrunkel) ### General & other improvements +- Prerequisites (PHP extensions, critical files/folders) will now be checked and properly reported if there are problems (thanks @Forceu) - Improved the the overview pages on mobile devices (main column was hidden) (thanks @Mik-) diff --git a/helpers/PrerequisiteChecker.php b/helpers/PrerequisiteChecker.php index 5730081a..96e16c3e 100644 --- a/helpers/PrerequisiteChecker.php +++ b/helpers/PrerequisiteChecker.php @@ -1,14 +1,13 @@ \ No newline at end of file diff --git a/public/index.php b/public/index.php index f65a1f7a..e22b3975 100644 --- a/public/index.php +++ b/public/index.php @@ -2,12 +2,13 @@ require_once __DIR__ . '/../helpers/PrerequisiteChecker.php'; -try { +try +{ (new PrerequisiteChecker)->checkRequirements(); -} catch (ERequirementNotMet $e) { - die("Unable to run grocy: " . $e->getMessage()); +} +catch (ERequirementNotMet $ex) +{ + die('Unable to run grocy: ' . $ex->getMessage()); } require_once __DIR__ . '/../app.php'; - -?> \ No newline at end of file