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 3a7d8c7 commit cb1d270Copy full SHA for cb1d270
src/DB.php
@@ -228,7 +228,12 @@ public static function insertRequest(Update $update)
228
$sth->bindParam(':date', $date, \PDO::PARAM_STR);
229
$sth->bindParam(':chat_id', $chat_id, \PDO::PARAM_STR);
230
//TODO insert the user in users table?
231
- $sth->bindParam(':forward_from', $forward_from->toJSON(), \PDO::PARAM_STR);
+ if (is_object($forward_from)) {
232
+ $forward = $forward_from->toJSON();
233
+ } else {
234
+ $forward = '';
235
+ }
236
+ $sth->bindParam(':forward_from', $forward, \PDO::PARAM_STR);
237
$sth->bindParam(':forward_date', $forward_date, \PDO::PARAM_STR);
238
$sth->bindParam(':reply_to_message', $reply_to_message, \PDO::PARAM_STR);
239
$sth->bindParam(':text', $text, \PDO::PARAM_STR);
0 commit comments