Skip to content

Commit

Permalink
CLI-1347: Fix TypeError for null notificationUuid (#1749)
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored Jun 6, 2024
1 parent 293b2d4 commit a8d9070
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Command/CommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1242,9 +1242,11 @@ private static function getNotificationUuid(string $notification): string {
if (is_object($json)) {
return self::getNotificationUuidFromResponse($json);
}
// In rare cases, JSON can decode to a string that's a valid UUID.
self::validateUuid($json);
return $json;
if (is_string($json)) {
// In rare cases, JSON can decode to a string that's a valid UUID.
self::validateUuid($json);
return $json;
}
}
catch (JsonException | AcquiaCliException | ValidatorException) {
}
Expand Down

0 comments on commit a8d9070

Please sign in to comment.