diff --git a/src/Task/Assets/Scss.php b/src/Task/Assets/Scss.php index 999604b1..eb718eab 100644 --- a/src/Task/Assets/Scss.php +++ b/src/Task/Assets/Scss.php @@ -64,7 +64,12 @@ protected function scssphp($file) $scss->setFormatter($this->compilerOptions['formatter']); } - return $scss->compile($scssCode); + if (method_exists($scss, 'compileString')) { + // "compileString()" is available since scssphp v1.5 + return $scss->compileString($scssCode)->getCss(); + } else { + return $scss->compile($scssCode); + } } /**