From 479c34ca5d8eec352e88168cdae8288fb891725a Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Sat, 13 Oct 2018 20:15:37 -0400 Subject: [PATCH] I believe this should fix #51. --- inc/database.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/database.inc b/inc/database.inc index 95b225d..6c4d56c 100644 --- a/inc/database.inc +++ b/inc/database.inc @@ -11037,7 +11037,11 @@ class db ]); $tgts = $this->help->execute(); - if (is_array($tgts) && count($tgts)) { + if(is_array($tgts) && count($tgts) && isset($tgts['id'])) { + $tgts = [0 => $tgts]; + } + + if (is_array($tgts) && count($tgts) && isset($tgts[0])) { foreach ($tgts as $tgt) { $this->help->query_type = db_helper::INSERT; $this->help->sql = "INSERT IGNORE INTO `target_checklist` (`tgt_id`,`chk_id`) " .