Bug 12482: removing the use of the module C4::SQLHelper.pm, it is replaced by DBIx...
[koha_fer] / C4 / VirtualShelves.pm
index e44f1f2..70dc965 100644 (file)
@@ -334,6 +334,7 @@ sub AddShelf {
         $hashref->{allow_add}//0,
         $hashref->{allow_delete_own}//1,
         $hashref->{allow_delete_other}//0 );
+    return if $sth->err;
     my $shelfnumber = $dbh->{'mysql_insertid'};
     return $shelfnumber;
 }