From 8974cf09a1c1e24219159f569c9b458d65e86c73 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 8 Oct 2025 15:48:46 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- php/src/exceptions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/php/src/exceptions.php b/php/src/exceptions.php index 8bfcb9f..a6b1e88 100644 --- a/php/src/exceptions.php +++ b/php/src/exceptions.php @@ -14,7 +14,8 @@ class exceptions { if ($e instanceof UserException) $userMessage = $e->getUserMessage(); elseif ($e instanceof ExceptionShadow) $userMessage = $e->getUserMessage(); else return null; - return c::to_string($userMessage); + if ($userMessage === null) return null; + else return c::to_string($userMessage); } /** @param Throwable|ExceptionShadow $e */ @@ -22,7 +23,8 @@ class exceptions { if ($e instanceof UserException) $techMessage = $e->getTechMessage(); elseif ($e instanceof ExceptionShadow) $techMessage = $e->getTechMessage(); else return null; - return c::to_string($techMessage); + if ($techMessage === null) return null; + else return c::to_string($techMessage); } /** @param Throwable|ExceptionShadow $e */