Skip to content

Commit

Permalink
frankenphp: break loop when loopMax is reached (#174)
Browse files Browse the repository at this point in the history
Fixes the issue that the loop doesn't exist when `$loopMax` is reached,
but `$loopMax+1`. Please refer to
php-runtime/runtime#173 for details.
  • Loading branch information
tamcy authored Jun 14, 2024
1 parent 56822c3 commit 38a5dfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function run(): int
}

gc_collect_cycles();
} while ($ret && (-1 === $this->loopMax || ++$loops <= $this->loopMax));
} while ($ret && (-1 === $this->loopMax || ++$loops < $this->loopMax));

return 0;
}
Expand Down

0 comments on commit 38a5dfa

Please sign in to comment.