]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1429600 - Update Revision.pm type checking to treat bug id as a simple string...
authordklawren <dklawren@users.noreply.github.com>
Thu, 11 Jan 2018 14:55:24 +0000 (09:55 -0500)
committerDylan William Hardison <dylan@hardison.net>
Thu, 11 Jan 2018 14:55:24 +0000 (09:55 -0500)
extensions/PhabBugz/lib/Revision.pm

index 59312b39d767798d5d037aea6a0c1f92e55d7c40..1c91e3d85993a3ae8218e3bcd5e21ee5c9cdccb0 100644 (file)
@@ -36,7 +36,7 @@ my $SearchResult = Dict[
         repositoryPHID    => Maybe[Str],
         status            => HashRef,
         summary           => Str,
-        "bugzilla.bug-id" => Str
+        "bugzilla.bug-id" => Maybe[Str]
     ],
     attachments => Dict[
         reviewers => Dict[
@@ -93,7 +93,10 @@ sub _load {
 
     # Some values in Phabricator for bug ids may have been saved
     # white whitespace so we remove any here just in case.
-    $result->{fields}->{'bugzilla.bug-id'} = trim($result->{fields}->{'bugzilla.bug-id'});
+    $result->{fields}->{'bugzilla.bug-id'}
+        = $result->{fields}->{'bugzilla.bug-id'}
+          ? trim($result->{fields}->{'bugzilla.bug-id'})
+          : "";
 
     return $result;
 }