Adding check for lessphp compiler to getLessCompiler()
authorkaldari <rkaldari@wikimedia.org>
Mon, 1 Dec 2014 22:12:50 +0000 (14:12 -0800)
committerkaldari <rkaldari@wikimedia.org>
Mon, 1 Dec 2014 22:12:50 +0000 (14:12 -0800)
Otherwise, PHP fatal errors will be thrown for anyone who installs
without it.

Change-Id: Ia027b7a829bbdae88b750c8119c546c846f3ae54

includes/resourceloader/ResourceLoader.php

index eecb936..2c54f69 100644 (file)
@@ -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' );
                }