From: Cameron Ball Date: Thu, 13 Dec 2018 07:23:08 +0000 (+0800) Subject: Add missing early return in paybill for when the bill doesn't exist X-Git-Url: http://git.cameron1729.xyz/?p=SonOfLokstallBot.git;a=commitdiff_plain;h=19c8f08647930f45a617640370d759fdc589cfeb Add missing early return in paybill for when the bill doesn't exist --- diff --git a/purjolok.php b/purjolok.php index 10cc6fe..eeb2e6d 100644 --- a/purjolok.php +++ b/purjolok.php @@ -108,6 +108,7 @@ getTelegram()->addCommand( if(!$messages || count($messages) !== 1) { $this->replyWithMessage(['text' => "That doesn't look like a valid id. Use /mybills to list your bills."]); + return; } imap_delete(getInbox('Utilities/' . getMessageSender($this->getUpdate()) . ' To Pay'), $messages[0]['uid'], FT_UID);