From 09140119d13f9b870d694877e3a7a8a33e2069ee Mon Sep 17 00:00:00 2001 From: Prashanth YV Date: Fri, 10 Jan 2025 01:52:33 +0530 Subject: [PATCH] handles empty factory in ConnectException while recording request-response (#54121) --- src/Illuminate/Http/Client/PendingRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Http/Client/PendingRequest.php b/src/Illuminate/Http/Client/PendingRequest.php index 29a7f1c1538b..6ece4cc79dd6 100644 --- a/src/Illuminate/Http/Client/PendingRequest.php +++ b/src/Illuminate/Http/Client/PendingRequest.php @@ -941,7 +941,7 @@ public function send(string $method, string $url, array $options = []) $exception = new ConnectionException($e->getMessage(), 0, $e); $request = new Request($e->getRequest()); - $this->factory->recordRequestResponsePair($request, null); + $this->factory?->recordRequestResponsePair($request, null); $this->dispatchConnectionFailedEvent($request, $exception);