Merge pull request #646 from virtualtam/composer/check-autoload

composer: display an error message if the autoload script is missing
This commit is contained in:
VirtualTam 2016-09-06 19:17:23 +02:00 committed by GitHub
commit d06c28ef64
1 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,16 @@ error_reporting(E_ALL^E_WARNING);
// 3rd-party libraries
if (! file_exists(__DIR__ . '/vendor/autoload.php')) {
header('Content-Type: text/plain; charset=utf-8');
echo "Error: missing Composer configuration\n\n"
."If you installed Shaarli through Git or using the development branch,\n"
."please refer to the installation documentation to install PHP"
." dependencies using Composer:\n"
."- https://github.com/shaarli/Shaarli/wiki/Server-requirements\n"
."- https://github.com/shaarli/Shaarli/wiki/Download-and-Installation";
exit;
}
require_once 'inc/rain.tpl.class.php';
require_once __DIR__ . '/vendor/autoload.php';