From 646b7b516782228df96329806cba51b767751d65 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 19 Dec 2017 17:52:16 +0100 Subject: limit warning count, whitelist --- it_dbi.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/it_dbi.class b/it_dbi.class index 7b4594a..c896141 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -535,9 +535,9 @@ function query($query, $p = array()) if (($warning = $this->_link->get_warnings())) { do { - if ($warning->errno != 1364) + if ($warning->errno != 1364 && $warning->errno != 1261) $messages[] = $warning->message . " [error $warning->errno]"; - } while ($warning->next()); + } while ($warning->next() && ++$checked < 20); if ($messages) it::error('title' => "Mysql warning: " . $messages[0], 'body' => join("\n", $messages) . "\n"); -- cgit v1.2.3