From c59aba76f7786395f446ff6594164df1415efc60 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Thu, 7 Nov 2024 07:33:35 -0500 Subject: [PATCH] do not attempt to parse null UUID --- lib/phast/server/UUID.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/phast/server/UUID.inc.php b/lib/phast/server/UUID.inc.php index e5fd205..e72103f 100644 --- a/lib/phast/server/UUID.inc.php +++ b/lib/phast/server/UUID.inc.php @@ -176,8 +176,11 @@ return $result; } - public static function parse(string $value) + public static function parse(?string $value) : ?UUID { + if ($value == null) + return null; + $result = UUID::TryParseGuidWithDashes($value); return $result->parsedGuid; }