[Koha-bugs] [Bug 26464] Code correction in opac-main when news_id passed

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 15 21:43:18 CEST 2020


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

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

--- Comment #3 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 110118
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110118&action=edit
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 at rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

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


More information about the Koha-bugs mailing list