From 4c08cb36a859f3654f95679dd9d095238a9fa5e5 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 3 Feb 2026 18:30:51 +0530 Subject: [PATCH] chore: safeguard span finish --- src/Appwrite/Platform/Tasks/Interval.php | 2 +- src/Appwrite/Platform/Workers/Messaging.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); } }