diff --git a/autoload.php b/autoload.php index 1e5ad34..2e2724f 100644 --- a/autoload.php +++ b/autoload.php @@ -11,4 +11,14 @@ * @see core/modules/statistics/statistics.php */ -return require __DIR__ . '/vendor/autoload.php'; +$autoloader = include __DIR__ . '/vendor/autoload.php'; + +if (!$autoloader) { + header('500 Internal Server Error'); + print 'Dependencies error! The system cannot access some files at the vendor folder.
' . PHP_EOL . + 'Did you run composer install? You may also need to check the folder permissions, too.
' . PHP_EOL . + 'Refer to the the Drupal installationg guide for instructions on installing with Composer.' . PHP_EOL; + exit(); +} + +return $autoloader; diff --git a/index.php b/index.php index 750dc28..1db38a6 100644 --- a/index.php +++ b/index.php @@ -13,6 +13,14 @@ $autoloader = require_once 'autoload.php'; +if (!class_exists('\Drupal')) { + header('500 Internal Server Error'); + print 'Dependencies error! The system cannot access some files at the vendor folder.
' . PHP_EOL . + 'Did you run composer install? You may also need to check the folder permissions, too.
' . PHP_EOL . + 'Refer to the the Drupal installationg guide for instructions on installing with Composer.' . PHP_EOL; + exit; +} + $kernel = new DrupalKernel('prod', $autoloader); $request = Request::createFromGlobals();