We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent feba9d7 commit 208d28bCopy full SHA for 208d28b
src/Entities/Message.php
@@ -158,7 +158,7 @@ public function getCommand(): ?string
158
}
159
160
$full_command = $this->getFullCommand();
161
- if (strpos($full_command, '/') !== 0) {
+ if (!is_string($full_command) || strpos($full_command, '/') !== 0) {
162
return null;
163
164
$full_command = substr($full_command, 1);
@@ -261,7 +261,7 @@ public function getType(): string
261
'reply_markup',
262
];
263
264
- $is_command = strlen($this->getCommand()) > 0;
+ $is_command = is_string($command = $this->getCommand()) && strlen($command) > 0;
265
foreach ($types as $type) {
266
if ($this->getProperty($type) !== null) {
267
if ($is_command && $type === 'text') {
0 commit comments