Skip to content
Snippets Groups Projects
Commit 6b699042 authored by Graham McVicker's avatar Graham McVicker
Browse files

Made check for insertion failure stricter. sth->execute could return "0E0"...

Made check for insertion failure stricter. sth->execute could return "0E0" which perl evaluates as true but zero (fix from lec)
parent 5ca696dd
No related branches found
No related tags found
No related merge requests found
......@@ -333,7 +333,9 @@ sub store {
# if we need to fetch the timestamp, or the insert failed due to existance
# of an existing entry, we need to retrieve the entry from the db
if(!$analysis->created() || !$rows_inserted) {
# note: $sth->execute can return 0E0 on erorr which is zero, but true
# which is why the $rows_inserted clause was added.
if(!$analysis->created() || !$rows_inserted || $rows_inserted == 0) {
my $new_analysis = $self->fetch_by_logic_name($analysis->logic_name);
if(!$new_analysis) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment