[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
Wed Feb 10 07:26:49 CET 2021


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

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #116628|0                           |1
        is obsolete|                            |

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

$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