Skip to content

Commit 590fb71

Browse files
committed
Better error checking
1 parent f533674 commit 590fb71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Webhook.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class Webhook
1212
{
1313
private static $eventSubscriptions = array();
14-
private static $receivedWebhook = false;
14+
private static $receivedWebhook = null;
1515

1616
/**
1717
* Subscribe to an incoming webhook request. The callback will be invoked when a matching webhook is received.
@@ -35,7 +35,7 @@ public static function subscribe($event, callable $callback)
3535
public static function receive($input = null)
3636
{
3737
if (is_null($input)) {
38-
if (self::$receivedWebhook !== false) {
38+
if (self::$receivedWebhook !== null) {
3939
$input = self::$receivedWebhook;
4040
} else {
4141
$input = file_get_contents("php://input");

0 commit comments

Comments
 (0)