Skip to content

Commit 74de318

Browse files
committed
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.
1 parent 30284b0 commit 74de318

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Internal/RejectedPromiseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function getPromiseTestAdapter(callable $canceller = null)
3434
$promise = new RejectedPromise($reason);
3535
}
3636
},
37-
'settle' => function ($reason = null) use (&$promise) {
37+
'settle' => function ($reason = "") use (&$promise) {
3838
if (!$promise) {
3939
if (!$reason instanceof Exception) {
4040
$reason = new Exception($reason);

0 commit comments

Comments
 (0)