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 [
|
return [
|
||||||
...$this->notification->toArray(),
|
...$this->notification->toArray(),
|
||||||
'metadata' => array_merge(...$stamps),
|
'metadata' => $stamps ? array_merge(...$stamps) : [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user