From 0d3fc0a517114d887cd2e868c10f9f09b617501e 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 --- 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 4dd07a9..ebfaa1c 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.7.9.5