Add missing early return in paybill for when the bill doesn't exist
authorCameron Ball <cameron@cameron1729.xyz>
Thu, 13 Dec 2018 07:23:08 +0000 (15:23 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Wed, 19 Dec 2018 03:48:36 +0000 (11:48 +0800)
purjolok.php

index 10cc6fe..eeb2e6d 100644 (file)
@@ -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);