From d7a81074e3bda472e0e3ab720192c794fd038d44 Mon Sep 17 00:00:00 2001 From: Emanuele Sorce Date: Mon, 10 Oct 2022 18:24:04 +0200 Subject: [PATCH] Fix PHP deprecation error in SDKExecption Php deprecation error in php 8.1: PHP Deprecated: Exception::__construct(): Passing null to parameter #1 ($message) of type string is deprecated in /zohocrm/php-sdk/src/com/zoho/crm/api/exception/SDKException.php on line 42 --- src/com/zoho/crm/api/exception/SDKException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/zoho/crm/api/exception/SDKException.php b/src/com/zoho/crm/api/exception/SDKException.php index b3731d1..4bc6bff 100755 --- a/src/com/zoho/crm/api/exception/SDKException.php +++ b/src/com/zoho/crm/api/exception/SDKException.php @@ -39,7 +39,7 @@ public function __construct($code, $message, $details=null, \Exception $cause=nu $this->_message = $cause->getMessage(); } - parent::__construct($message); + parent::__construct(is_null($message) ? "" : $message); } /** @@ -99,4 +99,4 @@ public function __toString() return $returnMsg; } -} \ No newline at end of file +}