mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Merge branch 'patch-1' of github.com:boekkooi/uuid into boekkooi-patch-1
This commit is contained in:
@@ -53,6 +53,10 @@ class UuidType extends Type
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($value instanceof Uuid) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
try {
|
||||
$uuid = Uuid::fromString($value);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
@@ -74,7 +78,7 @@ class UuidType extends Type
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($value instanceof Uuid) {
|
||||
if ($value instanceof Uuid || Uuid::isValid($value)) {
|
||||
return (string) $value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user