From f15cdecbe17a314236c4321b48cfb79c9488feb7 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 3 Oct 2023 23:11:38 +0900 Subject: [PATCH] Fix potential type error in Debug::translateFilename() --- common/framework/Debug.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/framework/Debug.php b/common/framework/Debug.php index 11de79b00..6f2b96123 100644 --- a/common/framework/Debug.php +++ b/common/framework/Debug.php @@ -625,7 +625,7 @@ class Debug } else { - $caller_errfile = self::translateFilename($trace['file']); + $caller_errfile = self::translateFilename($trace['file'] ?? ''); $caller_errline = $trace['line']; } } @@ -667,7 +667,7 @@ class Debug } // Find out the file where the error really occurred. - $errinfo['file'] = self::translateFilename($errinfo['file']); + $errinfo['file'] = self::translateFilename($errinfo['file'] ?? ''); // Add the entry to the error log. $message = sprintf('%s in %s on line %d', $errinfo['message'], $errinfo['file'], intval($errinfo['line']));