Skip to content

Commit

Permalink
Fix the assertion failure when live_range is null
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i committed Nov 23, 2023
1 parent c5c5766 commit 7bbc8e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Lib/PhpInternals/Types/Zend/ZendOpArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,10 @@ public function findLiveTmpVars(
int $op_num,
Dereferencer $dereferencer,
): array {
if ($this->live_range === null) {
return [];
}
$result = [];
assert($this->live_range !== null);
for ($i = 0; $i < $this->last_live_range; $i++) {
$live_range = $dereferencer->deref($this->live_range->indexedAt($i));
if ($live_range->isInRange($op_num)) {
Expand Down

0 comments on commit 7bbc8e1

Please sign in to comment.