diff options
author | Urban Müller | 2017-12-19 17:52:16 +0100 |
---|---|---|
committer | Urban Müller | 2017-12-19 17:52:16 +0100 |
commit | 646b7b516782228df96329806cba51b767751d65 (patch) | |
tree | ff9b3e6b5e5757417647f185b69ca55b8e0a98dd /it_dbi.class | |
parent | 9dbe4f1aeafb3f443cc222b03972ffcc37d99321 (diff) | |
download | itools-646b7b516782228df96329806cba51b767751d65.tar.gz itools-646b7b516782228df96329806cba51b767751d65.tar.bz2 itools-646b7b516782228df96329806cba51b767751d65.zip |
limit warning count, whitelist
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 4 |
1 files 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"); |