Bug 14075 - Undefined value creates noisy warns in C4::AuthoritiesMarc
Summary: Undefined value creates noisy warns in C4::AuthoritiesMarc
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-29 04:04 UTC by Aleisha Amohia
Modified: 2016-12-05 21:23 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc (1.35 KB, patch)
2015-04-29 04:12 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc (993 bytes, patch)
2015-04-29 05:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc (1.32 KB, patch)
2015-04-29 05:29 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc (1.38 KB, patch)
2015-04-29 11:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2015-04-29 04:04:46 UTC
If sortby is not set and left as undefined, there are a bunch of noisy errors
Comment 1 Aleisha Amohia 2015-04-29 04:12:10 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2015-04-29 04:59:48 UTC
Comment on attachment 38624 [details] [review]
Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc

Review of attachment 38624 [details] [review]:
-----------------------------------------------------------------

::: C4/AuthoritiesMarc.pm
@@ +18,4 @@
>  
>  use strict;
>  use warnings;
> +use lib '.';

Why this addition?
Comment 3 Aleisha Amohia 2015-04-29 05:02:38 UTC
(In reply to M. Tompsett from comment #2)
> Comment on attachment 38624 [details] [review] [review]
> Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc
> 
> Review of attachment 38624 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: C4/AuthoritiesMarc.pm
> @@ +18,4 @@
> >  
> >  use strict;
> >  use warnings;
> > +use lib '.';
> 
> Why this addition?

Oops forgot to take that out when I was experimenting earlier! My bad
Comment 4 Aleisha Amohia 2015-04-29 05:04:58 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2015-04-29 05:24:38 UTC
Comment on attachment 38626 [details] [review]
Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc

Review of attachment 38626 [details] [review]:
-----------------------------------------------------------------

::: C4/AuthoritiesMarc.pm
@@ -18,4 @@
>  
>  use strict;
>  use warnings;
> -use lib '.';

Now you lost your change, because you obsoleted the other patch.
Comment 6 Aleisha Amohia 2015-04-29 05:27:53 UTC
(In reply to M. Tompsett from comment #5)
> Comment on attachment 38626 [details] [review] [review]
> Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc
> 
> Review of attachment 38626 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: C4/AuthoritiesMarc.pm
> @@ -18,4 @@
> >  
> >  use strict;
> >  use warnings;
> > -use lib '.';
> 
> Now you lost your change, because you obsoleted the other patch.

Of course oops my mistake again,thanks for fixing that
Comment 7 Mark Tompsett 2015-04-29 05:29:13 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2015-04-29 11:37:42 UTC
Created attachment 38660 [details] [review]
Bug 14075: Undefined value creates noisy warns in C4::AuthoritiesMarc

This match sets $sortby (previously undefined value) as an empty string to get rid of the warns.

To test:

1) Go to a URL such as http://localhost:8080/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operator=contains&value=a&marclist=any&and_or=and
2) Notice the warns in the error log
3) Apply patch
4) Reload URL
5) Notice page still works but no warns in error log

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: I would have done $sortby //= '';
      But this works too. :)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 9 Tomás Cohen Arazi (tcohen) 2015-05-06 18:27:20 UTC
Patch pushed to master.

Thanks Aleisha!
Comment 10 Chris Cormack 2015-05-17 06:45:12 UTC
Pushed to 3.18.x will be in 3.18.7
Comment 11 Mason James 2015-05-29 08:09:19 UTC
Pushed to 3.16.x, will be in 3.16.11