From 2781a6523e586110fde74b0d57ea06e6f063fae8 Mon Sep 17 00:00:00 2001 From: Calin Blaga Date: Tue, 25 May 2021 13:32:56 +0300 Subject: [PATCH] feat(BE-1914): makes it php 7.4 compatible Signed-off-by: Calin Blaga --- lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php b/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php index 22f440e1..5516ac05 100644 --- a/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php +++ b/lib/PHPPdf/Core/Formatter/StandardPositionFormatter.php @@ -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();