Summary: | Code correction in opac-main when news_id passed | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Architecture, internals, and plumbing | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | aleisha, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.05
|
|
Circulation function: | |||
Attachments: |
Bug 26464: Code correction in opac-main when news_id passed
Bug 26464: Code correction in opac-main when news_id passed |
Description
Marcel de Rooy
2020-09-15 12:09:32 UTC
Created attachment 110105 [details] [review] 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> Trivial. Taking liberty to self sign off. Created attachment 110118 [details] [review] 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> Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.05 minor trivial fix, not backported to 19.11.x |