Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Patches:
- SabreXML: Fix invalid PHP docs https://github.com/fruux/sabre-xml/pull/128
- SabreXML: Prevent infinite loops for empty props element https://github.com/fruux/sabre-xml/pull/132
- ZipStreamer: Fix zip generation for 7zip https://github.com/McNetic/PHPZipStreamer/pull/39
- scssphp: Fix Trying to access array offset on value of type null https://github.com/scssphp/scssphp/commit/05a5d11ea7f68c52fdb6a5ca35cf46613b608445
7 changes: 3 additions & 4 deletions scssphp/scssphp/src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2712,7 +2712,6 @@ protected function shouldEval($value)
*/
protected function reduce($value, $inExp = false)
{

switch ($value[0]) {
case Type::T_EXPRESSION:
list(, $op, $left, $right, $inParens) = $value;
Expand Down Expand Up @@ -6170,10 +6169,10 @@ protected function libStrLength($args)
return new Node\Number(strlen($stringContent), '');
}

protected static $libStrSlice = ['string', 'start-at', 'end-at:null'];
protected static $libStrSlice = ['string', 'start-at', 'end-at:-1'];
protected function libStrSlice($args)
{
if (isset($args[2]) && $args[2][1] == 0) {
if (isset($args[2]) && ! $args[2][1]) {
return static::$nullString;
}

Expand All @@ -6186,7 +6185,7 @@ protected function libStrSlice($args)
$start--;
}

$end = (int) $args[2][1];
$end = isset($args[2]) ? (int) $args[2][1] : -1;
$length = $end < 0 ? $end + 1 : ($end > 0 ? $end - $start : $end);

$string[2] = $length
Expand Down