diff options
-rw-r--r-- | it_dbi.class | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class index c975f01..3166d85 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -40,6 +40,7 @@ class it_dbi 'localized_defaultlanguage' => "de", # Localize fields with this suffix, e.g. copy title_de to title on read 'throttle_writes' => 0, # sleep for 'throttle_writes' multiplied by the execution time after every write 'unbuffered' => false, # use MYSQLI_USE_RESULT (WARNING this is not at all equivalent to normal it_dbi WARNING) + 'ignoredwarnings' => "", # regex of additional mysql warnings numbers to ignore ); var $_key; # Key of currently loaded record or null (public readonly) @@ -535,7 +536,7 @@ function query($query, $p = array()) if (($warning = $this->_link->get_warnings())) { do { - if ($warning->errno != 1364 && $warning->errno != 1261) + if (!it::match(trim($this->_p['ignoredwarnings'] . "|1364|1261|1051", "|"), $warning->errno)) $messages[] = $warning->message . " [error $warning->errno]"; } while ($warning->next() && ++$checked < 20); |