Bug 8442

Summary: Error when printing labels under plack
Product: Koha Reporter: Paul Poulain <paul.poulain>
Component: Label/patron card printingAssignee: Dobrica Pavlinusic <dpavlin>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P5 - low CC: chris, dpavlin, jonathan.druart, mirko
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 8442 - labels creator fixes for plack
Bug 8442 - labels creator fixes for plack

Description Paul Poulain 2012-07-13 15:00:10 UTC
I was testing bug 8375, and was running plack when I reached an error that does not happen in CGI mode:

Can't call method "get_attr" on an undefined value at /home/paul/koha.dev/koha-community/labels/label-create-pdf.pl line 68.
 at /home/paul/koha.dev/koha-community/labels/label-create-pdf.pl line 261
Comment 1 Dobrica Pavlinusic 2012-07-20 12:18:46 UTC Comment hidden (obsolete)
Comment 2 Dobrica Pavlinusic 2012-07-20 12:19:08 UTC
*** Bug 8482 has been marked as a duplicate of this bug. ***
Comment 3 Mirko Tietgen 2012-07-21 13:59:07 UTC
Created attachment 11062 [details] [review]
Bug 8442 - labels creator fixes for plack

- remove all exit(1) and replace them with __END__ which benefits CGI
- insert correct =cut markers at end of POD (required for CGI::Compile
  under plack to correctly parse source code and exeute it)
- scope variables with our which are used inside sub for plack

Signed-off-by: Mirko Tietgen <5p4m@gmx.de>
Comment 4 Jonathan Druart 2012-07-23 14:17:54 UTC
Marking as Passed QA
Comment 5 Chris Cormack 2013-04-20 11:02:51 UTC
Released in 3.10.0