This commit is contained in:
Yuri Kuznetsov
2023-02-15 17:09:36 +02:00
parent d9c0f7d055
commit 46bd520b52
+4 -2
View File
@@ -29,6 +29,8 @@
namespace Espo\Core\Utils;
use Exception;
use RuntimeException;
use stdClass;
class Util
@@ -638,8 +640,8 @@ class Util
try {
$hex = bin2hex(random_bytes(16));
}
catch (\Exception $e) {
throw new \RuntimeException("Could not generate UUID.");
catch (Exception) {
throw new RuntimeException("Could not generate UUID.");
}
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split($hex, 4));