I've been running "perl -c" through Koha files to check for compilation errors, and I came across the following: my" variable $biblio masks earlier declaration in same scope at ./catalogue/ISBDdetail.pl line 171. Sure enough, it looks like "my $biblio" is written twice in the same scope unnecessarily. I'll look at fixing that...
Created attachment 67356 [details] [review] Bug 19367 - $biblio variable redefined in same scope in ISBDdetail The following warning is generated by ISBDdetail.pl: my" variable $biblio masks earlier declaration in same scope at ./catalogue/ISBDdetail.pl line 171. This patch removes this unnecessary declaration, which removes the warning. _TEST PLAN_ After applying patch: 1) Check code compilation with "KOHA_CONF=/path/to/koha-conf.xml perl -c catalogue/ISBDdetail.pl" 2) Note the only message is "./catalogue/ISBDdetail.pl syntax OK" 2) On /cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=1, view the source of the page and verify that the Javascript contains a holdcount e.g. "var holdcount = 0".
I just need to check if $biblio isn't subject to spooky scoping action between those two points. It eyeballs well, though, without 'my' would be safe and not require any thought. :)
Created attachment 67370 [details] [review] Bug 19367 - $biblio variable redefined in same scope in ISBDdetail The following warning is generated by ISBDdetail.pl: my" variable $biblio masks earlier declaration in same scope at ./catalogue/ISBDdetail.pl line 171. This patch removes this unnecessary declaration, which removes the warning. _TEST PLAN_ After applying patch: 1) Check code compilation with "KOHA_CONF=/path/to/koha-conf.xml perl -c catalogue/ISBDdetail.pl" 2) Note the only message is "./catalogue/ISBDdetail.pl syntax OK" 2) On /cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=1, view the source of the page and verify that the Javascript contains a holdcount e.g. "var holdcount = 0". Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to M. Tompsett from comment #2) > I just need to check if $biblio isn't subject to spooky scoping action > between those two points. It eyeballs well, though, without 'my' would be > safe and not require any thought. :) Looks safe to me.
Created attachment 67780 [details] [review] Bug 19367 - $biblio variable redefined in same scope in ISBDdetail The following warning is generated by ISBDdetail.pl: my" variable $biblio masks earlier declaration in same scope at ./catalogue/ISBDdetail.pl line 171. This patch removes this unnecessary declaration, which removes the warning. _TEST PLAN_ After applying patch: 1) Check code compilation with "KOHA_CONF=/path/to/koha-conf.xml perl -c catalogue/ISBDdetail.pl" 2) Note the only message is "./catalogue/ISBDdetail.pl syntax OK" 2) On /cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=1, view the source of the page and verify that the Javascript contains a holdcount e.g. "var holdcount = 0". Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 17.11, thanks to everybody involved!