Skip to content

Commit

Permalink
b
Browse files Browse the repository at this point in the history
  • Loading branch information
mondrake committed Jan 23, 2024
1 parent ea20808 commit a1822cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Parser/Jpeg/Jpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function parseData(DataElement $data): void
if ($new_offset !== $offset) {
// Add any trailing data from previous segment in a
// RawData block.
$this->error('Unexpected data found at end of JPEG segment {id}/{hexid} @ offset {offset}, size {size}', [
$this->block->error('Unexpected data found at end of JPEG segment {id}/{hexid} @ offset {offset}, size {size}', [
'id' => $segment_id,
'hexid' => '0x' . strtoupper(dechex($segment_id)),
'offset' => $data->getAbsoluteOffset($offset),
Expand All @@ -50,11 +50,11 @@ public function parseData(DataElement $data): void
DataFormat::BYTE,
$offset
);
$this->addBlock($trail)->parseData($data, $offset, $new_offset - $offset);
$this->block->addBlock($trail)->parseData($data, $offset, $new_offset - $offset);
}
$offset = $new_offset;
} catch (DataException $e) {
$this->error($e->getMessage());
$this->block->error($e->getMessage());
return;
}

Expand All @@ -63,7 +63,7 @@ public function parseData(DataElement $data): void

// Warn if an unidentified segment is detected.
if (!in_array($segment_id, $this->block->getCollection()->listItemIds())) {
$this->warning('Invalid JPEG marker {id}/{hexid} found @ offset {offset}', [
$this->block->warning('Invalid JPEG marker {id}/{hexid} found @ offset {offset}', [
'id' => $segment_id,
'hexid' => '0x' . strtoupper(dechex($segment_id)),
'offset' => $data->getAbsoluteOffset($offset),
Expand Down

0 comments on commit a1822cf

Please sign in to comment.