Skip to content

Commit

Permalink
fix the handling of map ptr before 8.2
Browse files Browse the repository at this point in the history
fixes #429
  • Loading branch information
sj-i committed Mar 11, 2024
1 parent ccb6b99 commit e7d6250
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Lib/PhpInternals/ZendTypeReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,8 @@ public function resolveMapPtr(
$map_ptr_base + $map_ptr,
8,
);
$address_candidate = $dereferencer->deref($pointer)->value;
}
if ($address_candidate === 0) {
return 0;
}
if ($this->isPhpVersionLowerThan(ZendTypeReader::V82)) {
return $dereferencer->deref($pointer)->value;
} elseif ($this->isPhpVersionLowerThan(ZendTypeReader::V82)) {
$pointer = new Pointer(
RawInt64::class,
$address_candidate,
Expand Down

0 comments on commit e7d6250

Please sign in to comment.