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'] ?: ''; } /** 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()),