mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Null default for Success
This commit is contained in:
parent
3edab2dfd3
commit
da3bbdf90c
@ -16,7 +16,7 @@ class Success implements Awaitable {
|
||||
*
|
||||
* @throws \InvalidArgumentException If an awaitable is given as the value.
|
||||
*/
|
||||
public function __construct($value)
|
||||
public function __construct($value = null)
|
||||
{
|
||||
if ($value instanceof Awaitable) {
|
||||
throw new \InvalidArgumentException("Cannot use an awaitable as success value");
|
||||
|
Loading…
Reference in New Issue
Block a user