Closed sy29 closed 1 year ago
Error : Call to a member function toJson() on array at BotApi.php:1342
$query = $inlineQuery->getQuery(); if ($query == 'dog') { $results[] = [ [ 'type' => 'photo', 'id' => '1', 'photo_url' => 'https://cdn.pixabay.com/photo/2016/02/19/15/46/dog-1210559_960_720.jpg', 'thumb_url' => 'https://cdn.pixabay.com/photo/2016/02/19/15/46/dog-1210559_960_720.jpg', 'caption' => 'Adorable dog' ] ]; } else { $results[] = [ [ 'type' => 'article', 'id' => '1', 'title' => 'No results found', 'input_message_content' => [ 'message_text' => 'Sorry, we could not find any results for your query' ] ] ]; } $bot->answerInlineQuery($id, $results);
Please help
Error : Call to a member function toJson() on array at BotApi.php:1342
Please help