https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30165
--- Comment #23 from Tomás Cohen Arazi <tomasco...@gmail.com> --- Created attachment 132139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132139&action=edit [OPTION 2] Bug 30165: (follow-up) Allow objects.search usage outside OpenAPI Our objects.search helper is written for being used in our API controllers, which get their query parameters processed by the OpenAPI plugin, using JSON::Validator. Particularly, the 'q' parameter is defined as 'multi' on our spec, which means objects.search always gets it as an arrayref. As the Objects.t tests are not using the OpenAPI plugin, a hashref is generated as only one q= is being passed. This patch adds an extra validation on objects.search, for the non-arrayref use case and does the right thing. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t => FAIL: Tests fail! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/