https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17480
--- Comment #5 from Jonathan Druart <[email protected]> --- (In reply to Katrin Fischer from comment #3) > Should we deactivate the feature somehow if misconfigured so it doesn't > break things? diff --git a/C4/Circulation.pm b/C4/Circulation.pm index e190019ae1a..b4437331027 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2150,8 +2150,8 @@ sub AddReturn { $yaml = "$yaml\n\n"; # YAML is anal on ending \n. Surplus does not hurt my $rules; eval { $rules = YAML::XS::Load(Encode::encode_utf8($yaml)); }; - if ($@) { - warn "Unable to parse UpdateNotForLoanStatusOnCheckin syspref : $@"; + if ($@ || ref($rules) ne 'HASH') { + warn "Unable to parse UpdateNotForLoanStatusOnCheckin syspref " . ($@ ? " : $@" || ""); } else { foreach my $key ( keys %$rules ) { This patch does what you want, but I don't think it's a good idea. If something is misconfigured it should not be ignored. Only the warn in the logs is certainly very easy to missed. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
