[Bug 19367] New: $biblio variable redefined in same scope in ISBDdetail
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Bug ID: 19367 Summary: $biblio variable redefined in same scope in ISBDdetail Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl 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... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 67356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67356&action=edit 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". -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- 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. :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Depends on| |17736 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17736 [Bug 17736] Move GetReservesFromBiblionumber to Koha::Biblio->holds -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67356|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 67370 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67370&action=edit 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> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | --- Comment #4 from 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67370|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 67780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67780&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org