From e935ab688554eea5e48080abf2f99e3832d31454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksander=20K=C4=85kol?= Date: Wed, 3 Dec 2025 22:34:36 +0100 Subject: [PATCH 1/2] Exceptions with only file name --- src/Utilities/TpayException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utilities/TpayException.php b/src/Utilities/TpayException.php index 5fb99f8..cbd5dfa 100644 --- a/src/Utilities/TpayException.php +++ b/src/Utilities/TpayException.php @@ -13,7 +13,7 @@ class TpayException extends Exception */ public function __construct($message, $code = 0) { - $message = sprintf('%s in file %s line: %s', $message, $this->getFile(), $this->getLine()); + $message = sprintf('%s in file %s line: %s', $message, basename($this->getFile()), $this->getLine()); Logger::log( 'TpayException', sprintf('%s %s%s%s', $message, PHP_EOL, PHP_EOL, $this->getTraceAsString()), From e48228198cb94a78424371c30898c0e8d93f72d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksander=20K=C4=85kol?= Date: Wed, 3 Dec 2025 23:01:07 +0100 Subject: [PATCH 2/2] Exceptions with only file name --- src/Utilities/RequestParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utilities/RequestParser.php b/src/Utilities/RequestParser.php index b607a2f..2783706 100644 --- a/src/Utilities/RequestParser.php +++ b/src/Utilities/RequestParser.php @@ -7,7 +7,7 @@ class RequestParser /** @return string */ public function getContentType() { - return $_SERVER['CONTENT_TYPE']; + return $_SERVER['CONTENT_TYPE'] ?: ''; } /**