Skip to content

Commit 79197aa

Browse files
committed
Fix __call
Now, when the class is extended, it doesn't create unwanted recursions
1 parent c741be5 commit 79197aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Telegram/Bot.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ public function asPayload(bool $enablePayload = true): void
214214
*/
215215
public function __call($method, $arguments): mixed
216216
{
217-
if (method_exists($this, $method)) {
218-
return $this->$method(...$arguments);
217+
if (method_exists(self::class, $method)) {
218+
return self::$method(...$arguments);
219219
}
220220

221221
if(!$this->payload) {

0 commit comments

Comments
 (0)