In C4/Reports/Guided.pm update_sql() called by test suite return warn :
Use of uninitialized value $sql in substitution (s///)
Test plan :
Run prove t/db_dependent/Reports/Guided.t and see warning disapearing
(whouchhhh)
Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
my $cache_expiry = $fields->{cache_expiry};
my $public = $fields->{public};
- $sql =~ s/(\s*\;\s*)$//; # removes trailing whitespace and /;/
+ $sql =~ s/(\s*\;\s*)$// if defined $sql; # removes trailing whitespace and /;/
my $report = Koha::Reports->find($id);
$report->last_modified(dt_from_string);
$report->savedsql($sql);