From a8d907062e554e1a696d666bb61c94889bfdb610 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 6 Jun 2024 10:03:08 -0700 Subject: [PATCH] CLI-1347: Fix TypeError for null notificationUuid (#1749) --- src/Command/CommandBase.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Command/CommandBase.php b/src/Command/CommandBase.php index 5c7a2074b..1d07953d4 100644 --- a/src/Command/CommandBase.php +++ b/src/Command/CommandBase.php @@ -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) { }