[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Frédéric Demians  changed:

   What|Removed |Added

 CC||frede...@tamil.fr

--- Comment #10 from Frédéric Demians  ---
This patch has been pushed to 3.20.x, will be in 3.20.9.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-01-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Julian Maurice  changed:

   What|Removed |Added

 Status|Pushed to Master|Pushed to Stable
 CC||julian.maur...@biblibre.com

--- Comment #9 from Julian Maurice  ---
Patches pushed to 3.22.x, will be in 3.22.3

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-01-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Brendan Gallagher  changed:

   What|Removed |Added

 CC||bren...@bywatersolutions.co
   ||m
 Status|Passed QA   |Pushed to Master

--- Comment #8 from Brendan Gallagher  ---
Pushed to Master - Should be in the May 2016 release.  Thanks

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-01-08 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

--- Comment #7 from Kyle M Hall  ---
Created attachment 46449
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46449&action=edit
Bug 15209: Check the parameter at the beginning of the subroutines

It seems better to check if parameters exist at the beginning of a
subroutine.
It makes the code easier to read and there is 1 indentation level less.

Signed-off-by: Jonathan Druart 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-01-08 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Kyle M Hall  changed:

   What|Removed |Added

  Attachment #46007|0   |1
is obsolete||
  Attachment #46008|0   |1
is obsolete||
  Attachment #46009|0   |1
is obsolete||

--- Comment #5 from Kyle M Hall  ---
Created attachment 46447
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46447&action=edit
Bug 15209 Validate passed MARC::Record objs in C4::Koha

Ensure that a passed MARC::Record is defined before calling
its methods. Otherwise you are open to occurences of the
error 'Can't call method "field" on an undefined value'
In a CGI environment you can live with such sloppiness but
in a persistent environment the error can cause the instance
to abort.
Made all routines passed a MARC::Record validate it before calling
its methods. Changed the parameter name from the meaningless
record to marcrecord to indicate its content. Added an explicit return
for all cases where no valid data returned. Cleaned up some logic for
clarity. I think we can assume that GetNormalizedOCLCNumber meant to
look at all 035s till it found an OCLC number not just the first.

Signed-off-by: Jonathan Druart 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-01-08 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

--- Comment #6 from Kyle M Hall  ---
Created attachment 46448
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46448&action=edit
Bug 15209: Add tests

Signed-off-by: Jonathan Druart 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-01-08 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2016-01-06 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Jonathan Druart  changed:

   What|Removed |Added

 Who signed the||Jonathan Druart
  patch off||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2015-12-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

--- Comment #4 from Jonathan Druart  
---
Created attachment 46009
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46009&action=edit
Bug 15209: Check the parameter at the beginning of the subroutines

It seems better to check if parameters exist at the beginning of a
subroutine.
It makes the code easier to read and there is 1 indentation level less.

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2015-12-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Jonathan Druart  changed:

   What|Removed |Added

   Severity|enhancement |normal
 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2015-12-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #44963|0   |1
is obsolete||

--- Comment #2 from Jonathan Druart  
---
Created attachment 46007
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46007&action=edit
Bug 15209 Validate passed MARC::Record objs in C4::Koha

Ensure that a passed MARC::Record is defined before calling
its methods. Otherwise you are open to occurences of the
error 'Can't call method "field" on an undefined value'
In a CGI environment you can live with such sloppiness but
in a persistent environment the error can cause the instance
to abort.
Made all routines passed a MARC::Record validate it before calling
its methods. Changed the parameter name from the meaningless
record to marcrecord to indicate its content. Added an explicit return
for all cases where no valid data returned. Cleaned up some logic for
clarity. I think we can assume that GetNormalizedOCLCNumber meant to
look at all 035s till it found an OCLC number not just the first.

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2015-12-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

--- Comment #3 from Jonathan Druart  
---
Created attachment 46008
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46008&action=edit
Bug 15209: Add tests

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2015-12-28 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Jonathan Druart  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15209] C4::Koha routines expecting a MARC::Record object should check it is defined

2015-11-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209

Colin Campbell  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff
   Assignee|gmcha...@gmail.com  |colin.campbell@ptfs-europe.
   ||com

--- Comment #1 from Colin Campbell  ---
Created attachment 44963
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44963&action=edit
Proposed patch

routines now return undef rather than aborting if undefined record is passed to
them

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/