Skip to content
forked from psliwa/PHPPdf

Commit

Permalink
feat(BE-1914): makes it php 7.4 compatible
Browse files Browse the repository at this point in the history
Signed-off-by: Calin Blaga <calin.blaga@arobs.com>
  • Loading branch information
calinblaga committed May 25, 2021
1 parent 5d11078 commit 2781a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function format(Nodes\Node $node, Document $document)
list($x, $y) = $boundary->getFirstPoint()->toArray();

$attributesSnapshot = $node->getAttributesSnapshot();
$diffWidth = $node->getWidth() - $attributesSnapshot['width'];
$diffWidth = $node->getWidth() - ($attributesSnapshot['width'] ?? 0);
$width = $node->getWidth();
$x += $width;
$yEnd = $y - $node->getHeight();
Expand Down

0 comments on commit 2781a65

Please sign in to comment.