From 74de3184ec9b5a011acff3cf46bb65db463af981 Mon Sep 17 00:00:00 2001 From: Benjamin Zikarsky Date: Sat, 5 Feb 2022 18:06:37 +0100 Subject: [PATCH] Fix incorrect default message for exception ctor PHP8.1+ complains about Exception not accepting `null` as the message argument for an `Exception` constructor. This fixes it. --- tests/Internal/RejectedPromiseTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Internal/RejectedPromiseTest.php b/tests/Internal/RejectedPromiseTest.php index 38eb3b40..028ca4dc 100644 --- a/tests/Internal/RejectedPromiseTest.php +++ b/tests/Internal/RejectedPromiseTest.php @@ -34,7 +34,7 @@ public function getPromiseTestAdapter(callable $canceller = null) $promise = new RejectedPromise($reason); } }, - 'settle' => function ($reason = null) use (&$promise) { + 'settle' => function ($reason = "") use (&$promise) { if (!$promise) { if (!$reason instanceof Exception) { $reason = new Exception($reason);