Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent "Notice: Undefined index" #85

Merged
merged 1 commit into from
Dec 23, 2015
Merged

Conversation

autowp
Copy link
Contributor

@autowp autowp commented Dec 22, 2015

... and following "Warning: Invalid argument supplied for foreach()"

... and following "Warning:  Invalid argument supplied for foreach()"
@jonnywilliamson
Copy link
Contributor

When was this happening?

@autowp
Copy link
Contributor Author

autowp commented Dec 23, 2015

For example

$telegram = new Api('123'); // any wrong formatted token
$telegram->getUpdates();
Notice: Undefined index: result in .../vendor/irazasyed/telegram-bot-sdk/src/Api.php on line 743
Warning: Invalid argument supplied for foreach() in .../vendor/irazasyed/telegram-bot-sdk/src/Api.php on line 743

irazasyed added a commit that referenced this pull request Dec 23, 2015
Check Result is set in Updates.
@irazasyed irazasyed merged commit d4091c8 into irazasyed:master Dec 23, 2015
@irazasyed
Copy link
Owner

@autowp Thanks!

@autowp autowp deleted the patch-1 branch December 23, 2015 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants