From 1cf1399511ae437f215c70241cc56d77982339ee Mon Sep 17 00:00:00 2001 From: kaldari Date: Mon, 1 Dec 2014 14:12:50 -0800 Subject: [PATCH] Adding check for lessphp compiler to getLessCompiler() Otherwise, PHP fatal errors will be thrown for anyone who installs without it. Change-Id: Ia027b7a829bbdae88b750c8119c546c846f3ae54 --- includes/resourceloader/ResourceLoader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index eecb9366ce..2c54f69fa6 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -1490,6 +1490,9 @@ class ResourceLoader { // When called from the installer, it is possible that a required PHP extension // is missing (at least for now; see bug 47564). If this is the case, throw an // exception (caught by the installer) to prevent a fatal error later on. + if ( !class_exists( 'lessc' ) ) { + throw new MWException( 'MediaWiki requires the lessphp compiler' ); + } if ( !function_exists( 'ctype_digit' ) ) { throw new MWException( 'lessc requires the Ctype extension' ); } -- 2.20.1