diff --git a/src/Appwrite/Platform/Tasks/Interval.php b/src/Appwrite/Platform/Tasks/Interval.php index 6d431705ab..6a11881ad1 100644 --- a/src/Appwrite/Platform/Tasks/Interval.php +++ b/src/Appwrite/Platform/Tasks/Interval.php @@ -65,7 +65,7 @@ class Interval extends Action } catch (\Exception $e) { Span::error($e); } finally { - Span::current()->finish(); + Span::current()?->finish(); } }); } diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index d1001d5e50..e23e55f1fb 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -124,7 +124,7 @@ class Messaging extends Action Span::error($e); throw $e; } finally { - Span::current()->finish(); + Span::current()?->finish(); } }