Bug 26669: Avoid a warn in update_sql
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>
This commit is contained in:
parent
410eb78a73
commit
28b478f8ab
|
|
@ -656,7 +656,7 @@ sub update_sql {
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue