diff --git a/lib/PHPExif/Mapper/Exiftool.php b/lib/PHPExif/Mapper/Exiftool.php index af996a1..f2e15a1 100644 --- a/lib/PHPExif/Mapper/Exiftool.php +++ b/lib/PHPExif/Mapper/Exiftool.php @@ -344,6 +344,7 @@ public function mapRawData(array $data): array $rotate = true; } } + // @phpstan-ignore isset.offset (better safe than sorry, but this should never happen) if (!isset($value_split[0]) || !isset($value_split[1])) { continue 2; } @@ -413,7 +414,11 @@ protected function extractGPSCoordinates(mixed $coordinates): float|false if (preg_match('!^([0-9.]+) deg ([0-9.]+)\' ([0-9.]+)"!', $coordinates, $matches) === 0) { return false; } - if (!isset($matches[1]) || !isset($matches[2]) || !isset($matches[3])) { + if (!isset($matches[1]) + // @phpstan-ignore isset.offset (better safe than sorry, but this should never happen) + || !isset($matches[2]) + // @phpstan-ignore isset.offset (better safe than sorry, but this should never happen) + || !isset($matches[3])) { return false; } return round(