Skip to content

Commit

Permalink
Merge pull request #3 from digizijn/php80
Browse files Browse the repository at this point in the history
gebruik setIndent niet bij php 8.0
  • Loading branch information
RdeWilde authored Sep 22, 2021
2 parents 045ed35 + 2c9c179 commit 027c413
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions SassHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,15 @@ protected function publishInside(
* @throws CException
*/
protected function setupOutputFormatting($compiler) {
if (YII_DEBUG) {
$compiler->setIndent(true);
} else {
$compiler->setIndent(true);
}
// setIndent not available in php 8.0 compiled version of sass.so
if (version_compare(phpversion(), '8.0', '<')) {
if (YII_DEBUG) {
$compiler->setIndent(true);
} else {
$compiler->setIndent(true);
}
}

$formatting = array(
self::OUTPUT_FORMATTING_NESTED => Sass::STYLE_NESTED,
self::OUTPUT_FORMATTING_COMPRESSED => Sass::STYLE_COMPRESSED,
Expand Down

0 comments on commit 027c413

Please sign in to comment.