do not attempt to parse null UUID
This commit is contained in:
parent
4907bcba10
commit
c59aba76f7
@ -176,8 +176,11 @@
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function parse(string $value)
|
public static function parse(?string $value) : ?UUID
|
||||||
{
|
{
|
||||||
|
if ($value == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
$result = UUID::TryParseGuidWithDashes($value);
|
$result = UUID::TryParseGuidWithDashes($value);
|
||||||
return $result->parsedGuid;
|
return $result->parsedGuid;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user