Merge "Adding check for lessphp compiler to getLessCompiler()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 2 Dec 2014 21:09:22 +0000 (21:09 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 2 Dec 2014 21:09:22 +0000 (21:09 +0000)
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' );
                }