Skip to content

Commit

Permalink
Merge pull request #4 from irazasyed/patch-1
Browse files Browse the repository at this point in the history
Fix undefined tag error
  • Loading branch information
felixdorn authored May 30, 2021
2 parents 2530714 + 7f003f8 commit ba5496e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function all(): array
$rules = static::ensureHttpClientIsLoaded()->request('GET', 'https://api.twitter.com/2/tweets/search/stream/rules');

return array_map(static function ($rawRule) {
$rule = new self($rawRule['value'], $rawRule['tag']);
$rule = new self($rawRule['value'], $rawRule['tag'] ?? '');
$rule->withId($rawRule['id']);

return $rule;
Expand Down

0 comments on commit ba5496e

Please sign in to comment.