aboutsummaryrefslogtreecommitdiff
path: root/app/models/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/Entry.php')
-rwxr-xr-xapp/models/Entry.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php
index c247c6362..d5a150bb1 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -216,7 +216,9 @@ class EntryDAO extends Model_pdo {
return true;
} else {
$info = $stm->errorInfo();
- Minz_Log::record ('SQL error : ' . $info[2], Minz_Log::NOTICE);
+ if ((int)($info[0] / 1000) !== 23) { //Filter out "SQLSTATE Class code 23: Constraint Violation" because of expected duplicate entries
+ Minz_Log::record ('SQL error ' . $info[0] . ': ' . $info[1] . ' ' . $info[2], Minz_Log::NOTICE); //TODO: Consider adding a Minz_Log::DEBUG level
+ }
return false;
}
}