Fix array_merge error and update exception handling

This commit is contained in:
Younes ENNAJI
2026-03-02 02:35:27 +00:00
parent 63b9083782
commit f3d72c88c9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ final class Envelope implements NotificationInterface
return [ return [
...$this->notification->toArray(), ...$this->notification->toArray(),
'metadata' => array_merge(...$stamps), 'metadata' => $stamps ? array_merge(...$stamps) : [],
]; ];
} }
+1 -1
View File
@@ -19,7 +19,7 @@ final readonly class IdStamp implements PresentableStampInterface, StampInterfac
{ {
try { try {
return bin2hex(random_bytes(16)); return bin2hex(random_bytes(16));
} catch (\Exception) { } catch (\Random\RandomException) {
return uniqid('', true); return uniqid('', true);
} }
} }