From: Gergő Tisza Date: Sat, 2 Feb 2019 19:56:31 +0000 (-0800) Subject: Improve error handling for wrong autoloader permissions X-Git-Tag: 1.34.0-rc.0~2924^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/File:File:Foobar.jpg?a=commitdiff_plain;h=a0381cf1ddba897f77395b3dd90f4e60422690d3;p=lhc%2Fweb%2Fwiklou.git Improve error handling for wrong autoloader permissions Running Composer manually with a user different from the webserver user and ending up with a vendor/autoload.php file that's unreadable to MediaWiki seems like an easy mistake to make. Make the error message when that happens less cryptic. Change-Id: I52600adceb38a7fc5384d00b5298e46a782c684f --- diff --git a/includes/Setup.php b/includes/Setup.php index 4ebe426b0a..cdbd527e74 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -67,6 +67,8 @@ require_once "$IP/includes/GlobalFunctions.php"; // Load composer's autoloader if present if ( is_readable( "$IP/vendor/autoload.php" ) ) { require_once "$IP/vendor/autoload.php"; +} elseif ( file_exists( "$IP/vendor/autoload.php" ) ) { + die( "$IP/vendor/autoload.php exists but is not readable" ); } // Assert that composer dependencies were successfully loaded