diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index f52c6babe4..3004b63bc6 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -615,11 +615,12 @@ sub execute_query { }; warn $@ if $@; + return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err); + # Check if table.* contained forbidden column names return ( $sth, { passworderr => "Illegal column in results" } ) if Koha::Report->new->check_columns( undef, $sth->{NAME_lc} ); - return ( $sth, { queryerr => $sth->errstr } ) if ($sth->err); return ( $sth ); }