Skip to content

Commit c1d1751

Browse files
Fix runtime exception on incrementing bool value with early exit (#199)
1 parent e6054f8 commit c1d1751

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Symfony/Sniffs/Arrays/MultiLineArrayCommaSniff.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ public function process(File $phpcsFile, $stackPtr)
9393
$closePtr,
9494
$stackPtr
9595
);
96+
97+
if ($lastCommaPtr === false) {
98+
return;
99+
}
100+
96101
while ($lastCommaPtr < $closePtr -1) {
97102
$lastCommaPtr++;
98103

0 commit comments

Comments
 (0)