Skip to content

Commit 30b2074

Browse files
committed
skip zero offset
1 parent daad186 commit 30b2074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function refactor(Node $node): ?Node
100100

101101
if ($offset instanceof Arg) {
102102
$offsetType = $this->getType($offset->value);
103-
if ($offsetType instanceof ConstantIntegerType && $offsetType->getValue() === 0) {
103+
if ($offsetType instanceof ConstantIntegerType && $offsetType->getValue() <= 0) {
104104
return null;
105105
}
106106

0 commit comments

Comments
 (0)