From 877b452eb2c6cd32ceacf6dc0c8e2cf75afb9bb1 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 13 Dec 2013 16:17:04 -0500 Subject: [PATCH] Bug 7567 - Undefined $lang triggers warning Changed: $template->param( $lang => 1, opac_news => $opac_news, opac_news_count => $opac_news_count, ); Into: $template->param( opac_news => $opac_news, opac_news_count => $opac_news_count, ); $template->param( $lang => 1 ) if $lang; Because $lang is not defined when you come immediately into Home -> Tools -> News. TEST PLAN --------- 1) log into staff client 2) Tools -> News 3) Check koha error log - Expecting to see an error like: koha-news.pl: Problem = a value of 1 has been passed to param without key 4) Apply patch 5) Home -> Tools -> News 6) Check koha error log - No error generated Signed-off-by: Chris Cormack --- tools/koha-news.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/koha-news.pl b/tools/koha-news.pl index 8a98c76..fb01195 100755 --- a/tools/koha-news.pl +++ b/tools/koha-news.pl @@ -113,9 +113,9 @@ else { } $template->param( - $lang => 1, opac_news => $opac_news, opac_news_count => $opac_news_count, ); + $template->param( $lang => 1 ) if $lang; } output_html_with_http_headers $cgi, $cookie, $template->output; -- 1.8.5.3