From e71a79ec954c4f8e3c263f6fb693537fb8f8533e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 23 Oct 2023 01:10:10 +0000 Subject: [PATCH] null check fix --- Mpdf/Mpdf.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mpdf/Mpdf.php b/Mpdf/Mpdf.php index 1ff35d0..97ed00d 100755 --- a/Mpdf/Mpdf.php +++ b/Mpdf/Mpdf.php @@ -6553,7 +6553,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface $lastfontreqstyle = null; $lastfontstyle = null; } - if ($blockdir == 'ltr' && strpos($lastfontreqstyle, "I") !== false && strpos($lastfontstyle, "I") === false) { // Artificial italic + if ($blockdir == 'ltr' && strpos($lastfontreqstyle ?? '', "I") !== false && strpos($lastfontstyle ?? '', "I") === false) { // Artificial italic $lastitalic = $this->FontSize * 0.15 * Mpdf::SCALE; } else { $lastitalic = 0; @@ -11366,7 +11366,7 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface } elseif (isset($_SERVER['PHP_SELF'])) { $currentPath = dirname($_SERVER['PHP_SELF']); } else { - $currentPath = __DIR__ . '/../../'; + $currentPath = '/'; } $currentPath = str_replace("\\", "/", $currentPath); if ($currentPath == '/') {