From 9dbe4f1aeafb3f443cc222b03972ffcc37d99321 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 19 Dec 2017 16:57:50 +0100 Subject: whitelist inserts without defaults for now --- it_dbi.class | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'it_dbi.class') diff --git a/it_dbi.class b/it_dbi.class index e4c3e2c..7b4594a 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -534,10 +534,13 @@ function query($query, $p = array()) $this->_affectedrows = $this->_link->affected_rows; # get_warnings() clobbers this if (($warning = $this->_link->get_warnings())) { - do - $messages[] = $warning->message; - while ($warning->next()); - it::error('title' => "Mysql warning: " . $messages[0], 'body' => join("\n", $messages) . "\n"); + do { + if ($warning->errno != 1364) + $messages[] = $warning->message . " [error $warning->errno]"; + } while ($warning->next()); + + if ($messages) + it::error('title' => "Mysql warning: " . $messages[0], 'body' => join("\n", $messages) . "\n"); } if ($writing && $this->_p['throttle_writes']) -- cgit v1.2.3