From 65129084ef2bdc5c4a9dea4f98480b30fc646d98 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 18 May 2012 15:01:45 -0400 Subject: [PATCH] Bug 8128 - can't seem to run new sql reports Reports cannot be saved because saved_sql.cache_expiry cannot be null. Fixed by setting default to 0 if a cache_expiry value is not passed into the function. Signed-off-by: Liz Rea passes t xt Verified original bug, patch resolves issue. Signed-off-by: Paul Poulain --- C4/Reports/Guided.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index 8081b32f60..c82e995aaa 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -473,6 +473,7 @@ Returns id of the newly created report sub save_report { my ( $borrowernumber, $sql, $name, $type, $notes, $cache_expiry, $public ) = @_; + $cache_expiry ||= 0; my $dbh = C4::Context->dbh(); $sql =~ s/(\s*\;\s*)$//; # removes trailing whitespace and /;/ my $query = -- 2.39.5