mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
Fix array_merge error and update exception handling
This commit is contained in:
@@ -175,7 +175,7 @@ final class Envelope implements NotificationInterface
|
||||
|
||||
return [
|
||||
...$this->notification->toArray(),
|
||||
'metadata' => array_merge(...$stamps),
|
||||
'metadata' => $stamps ? array_merge(...$stamps) : [],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ final readonly class IdStamp implements PresentableStampInterface, StampInterfac
|
||||
{
|
||||
try {
|
||||
return bin2hex(random_bytes(16));
|
||||
} catch (\Exception) {
|
||||
} catch (\Random\RandomException) {
|
||||
return uniqid('', true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user