From ad8786da0004eab69a56db94e51a4e76d5b34e52 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Mon, 2 Jul 2018 17:29:54 +0530 Subject: [PATCH] Set quantity to default to 1 --- webhook.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webhook.php b/webhook.php index 72ed50d..f654939 100644 --- a/webhook.php +++ b/webhook.php @@ -99,7 +99,10 @@ function add_requirement() { function deposit(){ global $command_list; $item_id = $command_list[1]; - $quantity = $command_list[2]; + $quantity = 1; + if (isset($command_list[2])){ + $quantity = $command_list[2]; + } $mysql = require('mysql_credentials.php'); $conn = new mysqli($mysql['servername'], $mysql['username'], $mysql['password'], $mysql['database']);