# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
-use strict;
-use warnings;
+use Modern::Perl;
use CGI qw ( -utf8 );
use JSON;
$sth->execute($params->{'source'}, $params->{'text'});
if ($sth->err) {
warn sprintf('Database returned the following error: %s', $sth->errstr);
- exit 1;
+ exit 0;
}
my $new_quote_id = $dbh->{q{mysql_insertid}}; # ALERT: mysqlism here
$sth = $dbh->prepare('SELECT * FROM quotes WHERE id = ?;');