From: kaldari Date: Mon, 1 Dec 2014 22:12:50 +0000 (-0800) Subject: Adding check for lessphp compiler to getLessCompiler() X-Git-Tag: 1.31.0-rc.0~13116^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=1cf1399511ae437f215c70241cc56d77982339ee;p=lhc%2Fweb%2Fwiklou.git Adding check for lessphp compiler to getLessCompiler() Otherwise, PHP fatal errors will be thrown for anyone who installs without it. Change-Id: Ia027b7a829bbdae88b750c8119c546c846f3ae54 --- 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' ); }