http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15209
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44963|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <[email protected]> --- 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 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] 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/
