| Summary: | $biblio variable redefined in same scope in ISBDdetail | ||
|---|---|---|---|
| Product: | Koha | Reporter: | David Cook <dcook> | 
| Component: | Cataloging | Assignee: | David Cook <dcook> | 
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> | 
| Severity: | minor | ||
| Priority: | P5 - low | CC: | jonathan.druart, m.de.rooy, mtompset | 
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 | 
| Patch complexity: | Small patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| Bug Depends on: | 17736 | ||
| Bug Blocks: | |||
| Attachments: | 
              Bug 19367 - $biblio variable redefined in same scope in ISBDdetail
               Bug 19367 - $biblio variable redefined in same scope in ISBDdetail Bug 19367 - $biblio variable redefined in same scope in ISBDdetail  | 
      ||
| 
 
        
          Description
        
        
          David Cook
        
        
        
        
          2017-09-26 00:42:03 UTC
        
       
    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!  |