edit-layout.pl: Use of uninitialized value $field in numeric lt (<) at /home/vagrant/kohaclone/patroncards/edit-layout.pl line 239 edit-layout.pl: Use of uninitialized value $field in concatenation (.) or string at /home/vagrant/kohaclone/patroncards/edit-layout.pl line 239 edit-layout.pl: Use of uninitialized value $field in concatenation (.) or string at /home/vagrant/kohaclone/patroncards/edit-layout.pl line 239 edit-layout.pl: Use of uninitialized value $image in numeric lt (<) at /home/vagrant/kohaclone/patroncards/edit-layout.pl line 247 edit-layout.pl: Use of uninitialized value $image in concatenation (.) or string at /home/vagrant/kohaclone/patroncards/edit-layout.pl line 247 edit-layout.pl: Use of uninitialized value $image in concatenation (.) or string at /home/vagrant/kohaclone/patroncards/edit-layout.pl line 247. To reproduce, go to Tools -> Patron Card Creator -> New layout
Created attachment 50686 [details] [review] Bug 15414: Silencing warns triggered by creating a new layout in patron card creator This patch assigns $field and $image values in the for loops To test: 1) Go to Tools -> Patron Card Creator -> New layout 2) Notice warns 3) Apply patch and refresh page 4) Notice warns are gone and page still works as expected Sponsored-by: Catalyst IT
Comment on attachment 50686 [details] [review] Bug 15414: Silencing warns triggered by creating a new layout in patron card creator Review of attachment 50686 [details] [review]: ----------------------------------------------------------------- ::: patroncards/edit-layout.pl @@ +236,4 @@ > elsif ($op eq 'new') { # this is a new layout > $layout = C4::Patroncards::Layout->new(); > my @fields = (); > + for (my $field = 0; $field < 4; $field++) { # limit 3 text fields Nice catch on the initialization missing.
Created attachment 50689 [details] [review] Bug 15414: Silencing warns triggered by creating a new layout in patron card creator This patch assigns $field and $image values in the for loops To test: 1) Go to Tools -> Patron Card Creator -> New layout 2) Notice warns 3) Apply patch and refresh page 4) Notice warns are gone and page still works as expected Sponsored-by: Catalyst IT NOTE: Trivial initialization in a loop issue. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 50923 [details] [review] Bug 15414: Silencing warns triggered by creating a new layout in patron card creator This patch assigns $field and $image values in the for loops To test: 1) Go to Tools -> Patron Card Creator -> New layout 2) Notice warns 3) Apply patch and refresh page 4) Notice warns are gone and page still works as expected Sponsored-by: Catalyst IT NOTE: Trivial initialization in a loop issue. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master! Should be in the May 2016 release. Grazie Aleisha!