From 2b8ca15e66f9b2981b27ae12272ff983b742637a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 23 Oct 2023 00:27:55 +0000 Subject: [PATCH] fix path --- Mpdf/Mpdf.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mpdf/Mpdf.php b/Mpdf/Mpdf.php index ec3280b..1ff35d0 100755 --- a/Mpdf/Mpdf.php +++ b/Mpdf/Mpdf.php @@ -11363,8 +11363,10 @@ class Mpdf implements \Psr\Log\LoggerAwareInterface if (!$str) { if (isset($_SERVER['SCRIPT_NAME'])) { $currentPath = dirname($_SERVER['SCRIPT_NAME']); - } else { + } elseif (isset($_SERVER['PHP_SELF'])) { $currentPath = dirname($_SERVER['PHP_SELF']); + } else { + $currentPath = __DIR__ . '/../../'; } $currentPath = str_replace("\\", "/", $currentPath); if ($currentPath == '/') {