Merge branch 'patch-1' of github.com:boekkooi/uuid into boekkooi-patch-1

This commit is contained in:
Ben Ramsey
2014-10-29 22:47:27 -05:00
+5 -1
View File
@@ -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;
}