diff --git a/icingaweb2.ruleset.xml b/icingaweb2.ruleset.xml
index 93cb742cc..537a6be9b 100644
--- a/icingaweb2.ruleset.xml
+++ b/icingaweb2.ruleset.xml
@@ -22,6 +22,7 @@
library/Icinga/Application/LegacyWeb.php
library/Icinga/Application/Web.php
library/Icinga/File/Pdf.php
+ library/Icinga/Util/LessParser.php
modules/doc/library/Doc/Renderer/DocSectionRenderer.php
modules/monitoring/library/Monitoring/Plugin.php
diff --git a/library/Icinga/Util/LessParser.php b/library/Icinga/Util/LessParser.php
new file mode 100644
index 000000000..84541fd8e
--- /dev/null
+++ b/library/Icinga/Util/LessParser.php
@@ -0,0 +1,38 @@
+getMessage());
+ }
+
+ return ['string', '', []];
+ }
+
+ protected function compileProp($prop, $block, $out)
+ {
+ try {
+ parent::compileProp($prop, $block, $out);
+ } catch (Exception $e) {
+ if (strpos($e->getMessage(), 'is undefined:') === false) {
+ // We silence mixin errors only
+ throw $e;
+ }
+
+ Logger::error($e->getMessage());
+ }
+ }
+}
diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php
index 1d9aec05c..55c0614da 100644
--- a/library/Icinga/Web/LessCompiler.php
+++ b/library/Icinga/Web/LessCompiler.php
@@ -4,7 +4,7 @@
namespace Icinga\Web;
use Icinga\Application\Logger;
-use lessc;
+use Icinga\Util\LessParser;
/**
* Compile LESS into CSS
@@ -16,7 +16,7 @@ class LessCompiler
/**
* lessphp compiler
*
- * @var lessc
+ * @var LessParser
*/
protected $lessc;
@@ -60,8 +60,7 @@ class LessCompiler
*/
public function __construct()
{
- require_once 'lessphp/lessc.inc.php';
- $this->lessc = new lessc();
+ $this->lessc = new LessParser();
// Discourage usage of import because we're caching based on an explicit list of LESS files to compile
$this->lessc->importDisabled = true;
}