From a0381cf1ddba897f77395b3dd90f4e60422690d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Sat, 2 Feb 2019 11:56:31 -0800 Subject: [PATCH] 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 --- includes/Setup.php | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.20.1