Bug 18511

Summary: Error loading booksellers.pl - Cannot use "->find" in list context
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: AcquisitionsAssignee: Nick Clemens (kidclamp) <nick>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: jonathan.druart, veron
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:
Circulation function:
Bug Depends on: 18179    
Bug Blocks:    
Attachments: Bug 18511 - Error loading booksellers.pl - Cannot use "->find" in list context

Description Nick Clemens (kidclamp) 2017-04-28 16:10:11 UTC
Cannot use "->find" in list context at /home/vagrant/kohaclone/acqui/booksellers.pl line 86.
Comment 1 Nick Clemens (kidclamp) 2017-04-28 16:12:54 UTC
Created attachment 62858 [details] [review]
Bug 18511 - Error loading booksellers.pl - Cannot use "->find" in list context

To test:
1 - Load http://localhost:8081/cgi-bin/koha/acqui/booksellers.pl?booksellerid=1
2 - Should get internal server erro
3 - Apply patch
4 - Reload
5 - Should not get error
Comment 2 Marc Véron 2017-04-28 18:15:49 UTC
Reproduced on top of 18179
Comment 3 Marc Véron 2017-04-28 18:23:01 UTC
With patch applied, problem is gone if booksellerid exists.

However I get an Internal server error if I change it to a non existing id, e.g.:
/cgi-bin/koha/acqui/booksellers.pl?booksellerid=999

Plack errorr log says:
Can't call method "name" on an undefined value at (...)booksellers.pl line 93

I did the same before applying 18179 and 18511, had no error.
Comment 4 Jonathan Druart 2017-04-28 20:27:06 UTC
Patch moved to bug 18179.

*** This bug has been marked as a duplicate of bug 18179 ***