Bug 26464: Code correction in opac-main when news_id passed
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 15 Sep 2020 12:09:56 +0000 (12:09 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 18 Sep 2020 09:49:29 +0000 (11:49 +0200)
commit22f14a7b6d45f3bf5ad57bd52203d4cdef724ce7
treeec67b46cfb3b848c771f9421adb5176d6a5b8cb3
parent0310e973a4c28a7e02baad03799eb40869ce4506
Bug 26464: Code correction in opac-main when news_id passed

Theoretical change. If somehow the search would return more than one result, the code is wrong.

The if test can be simplified: remove scalar and >0.
We should not pass @array to one param. It would theoretically add wrong items or
trigger an odd number warning. If it is only one, it is no problem. But it is buggy.

Test plan:
Pass an existing news_id to opac-main. Item visible?
And pass a not-existing. Error message?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
opac/opac-main.pl