I am using a very simple code to test phpsass
$sass = new SassParser();
$c = file_get_contents('/_www/_projects/cdn/public_html/test/test.sass');
$css = $sass->toCss($c);
The sass file is very basic:
$blue: #3bbfce;
$margin: 16px;
table.hl {
margin: 2em 0;
td.ln {
text-align: right;
}
}
li {
font: {
family: serif;
weight: bold;
size: 1.2em;
}
}
.content-navigation {
border-color: $blue;
color:
darken($blue, 9%);
}
.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $blue;
}
And I get the following error:
Fatal error: Uncaught exception 'SassNumberException' with message ' in D:\_www\_git\phpsass\script\literals\SassNumber.php on line 201
SassNumberException: Number must be a number: Array::26 Source: padding: $margin / 2; in D:\_www\_git\phpsass\script\literals\SassNumber.php on line 201
If it can help, there's also the following notice thrown before (I tried to change the error_reporting level but having the notice disappear of course didn't solve the problem):
Notice: Array to string conversion in D:\_www\_git\phpsass\SassException.php on line 25
If I use the same sass code against their online PHP compiler at http://www.phpsass.com/try/ it compiles correctly... I don't get it