[Koha-bugs] [Bug 27650] Wrong variable passed to the template in opac-main

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 8 11:29:48 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27650

--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 116490
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116490&action=edit
Bug 27650: Fix variable passed to the template in opac-main

From:
  commit acb455f151ac737613857c58e64a600d760a59e0
  Bug 14272: Show single news item [alternative patch]

$template->param(
+    koha_news           => @all_koha_news,

We must not pass an array, the number of elements of the hash passed to the
template may be inconsistent.

It's working because of an error earlier in the script:
+    @all_koha_news   = &GetNewsToDisplay($news_lang,$homebranch);

GetNewsToDisplay returns an arrayref

Test plan:
Define at least 2 news to display on the OPAC main page
Hit opac-main.pl
=> All news are displayed
Click one
=> You see the single news you selected

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list