Closed PeterNotenboom closed 8 years ago
Thanks for reporting, On the documentation the "count" field seems mandatory: https://core.telegram.org/bots/api#userprofilephotos Can you provide the json log of the update?
I found the issue:
src/Entities/UserProfilePhotos.php
:
$this->total_count = isset($data['total_count']) ? $data['total_count'] : null;
if (empty($this->total_count)) {
print_r($data) will give:
Array
(
[total_count] => 0
[photos] => Array
(
)
)
And a var_dump($this->total_count) will give (a correct): int(0)
So the problem is:
if (empty($this->total_count)) {
int(0) is TRUE
on empty():
http://stackoverflow.com/a/2220529
Photos (2 lines further) has the same problem. I can make a pull request.
Pull request created. Edit: And see it's merged now. Closing issue!
The /whoami build-in command fails if you don't have a profile picture. It would show "xxxxxbot is typing..." And that disappears.
The following Stack-trace is then thrown: