When using Stage MARC records for import with a matching rule where an offset is defined, the input string may be empty or shorter than the offset. This generated a warning : stage-marc-import.pl: substr outside of string at /home/koha/src/C4/Matcher.pm line 822.
Created attachment 59069 [details] [review] Bug 17915 - warning in Stage MARC records for import when matching rule with offset When using Stage MARC records for import with a matching rule where an offset is defined, the input string may be empty or shorter than the offset. This generated a warning : stage-marc-import.pl: substr outside of string at /home/koha/src/C4/Matcher.pm line 822. Test plan : - define a matching rule on ISBN with length 0 and offset 999 (too big for any value) - import some MARC records with this matching rule - check the perl warns => Without patch you see warns : "substr outside of string at /home/koha/src/C4/Matcher.pm" => With patch no such warn - edit the matching rule to set offset 0 - import some MARC records, with matching ISBN, with this matching rule => Import must match existing records with same ISBN
I can't reproduce this problem in master
I was able to reproduce this problem in master, and the patch does make the error go away. However, I'm seeing a different error now: stage-marc-import.pl: DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at /home/vagrant/kohaclone/Koha/Objects.pm line 92 Is this error within the scope of this bug?
(In reply to Owen Leonard from comment #3) > I was able to reproduce this problem in master, and the patch does make the > error go away. However, I'm seeing a different error now: > > stage-marc-import.pl: DBIx::Class::Storage::DBI::select_single(): Query > returned more than one row. SQL that returns multiple rows is DEPRECATED > for ->find and ->single at /home/vagrant/kohaclone/Koha/Objects.pm line 92 > > Is this error within the scope of this bug? Oh could you test again please ?