Closed nasserghiasi closed 7 years ago
@nasserghiasi Wow, thanks for pointing this out!
A better solution in my opinion, would be the following (simply to change getText
to getType
):
$text = $update_content->getType();
This will then show the type of message received in the log, instead of the text of a text message. I think it makes more sense to see what type of message is received instead of the content itself.
This would also be better for privacy reasons 👍
@jacklul You agree?
I think better choice is you let to developer choose output type
Please fix this bug, I need it
Have you seen the PR I made to your master branch? https://github.com/nasserghiasi/telegram-bot-manager/pull/1
It's a suggested solution, if you're happy with it, you can merge it and I'll merge here :+1:
@nasserghiasi Version 1.2.0 has been released, enjoy!
when the user sends another type of request just like document or photo, $text going to null and trim() function throw PHP fatal error.