[Koha-bugs] [Bug 15777] New: Refactor loop in which Record::Processor does not initialize parameters
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Feb 10 02:13:09 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15777
Bug ID: 15777
Summary: Refactor loop in which Record::Processor does not
initialize parameters
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: gmcharlt at gmail.com
Reporter: mtompset at hotmail.com
QA Contact: testopia at bugs.koha-community.org
foreach my $filter (@{ $req_filters }) {
next unless $filter;
my $filter_module = $filter =~ m/:/ ? $filter :
"Koha::Filter::${schema}::${filter}";
if (can_load( modules => { $filter_module => undef } )) {
my $object = $filter_module->new();
$filter_module->initialize($param);
push @filters, $object;
}
}
"$filter_module->initialize($param);" should be
"$object->initialize($param);
Additionally, object isn't really descriptive, and it isn't clear that $filter
is the string name of the filter. So, this loop will have some variable
renaming done on it.
And the first commit will include a test that fails to initialize.
And the second commit will include this revision which should then pass.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list