summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2017-12-19 16:57:50 +0100
committerUrban Müller2017-12-19 16:57:50 +0100
commit9dbe4f1aeafb3f443cc222b03972ffcc37d99321 (patch)
treecca9853ec6e323ad7584e340a44203f48a646e2c
parent0e7b57ca48120f75b8bfed01072951d6b0c76542 (diff)
downloaditools-9dbe4f1aeafb3f443cc222b03972ffcc37d99321.tar.gz
itools-9dbe4f1aeafb3f443cc222b03972ffcc37d99321.tar.bz2
itools-9dbe4f1aeafb3f443cc222b03972ffcc37d99321.zip
whitelist inserts without defaults for now
-rw-r--r--it_dbi.class11
1 files changed, 7 insertions, 4 deletions
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'])