[Koha-bugs] [Bug 15446] New: Koha::Object[s]->type should be renamed to _type to avoid conflict with column name
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Dec 30 18:05:43 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15446
Bug ID: 15446
Summary: Koha::Object[s]->type should be renamed to _type to
avoid conflict with column name
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: ASSIGNED
Severity: major
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: jonathan.druart at bugs.koha-community.org
Reporter: jonathan.druart at bugs.koha-community.org
QA Contact: testopia at bugs.koha-community.org
Depends on: 13967
In a few case (at least systempreferences and export_format (csv profiles), the
type method of Koha::Object and Koha::Objects can be in conflict with the
column names.
Indeed systempreferences.type exists and so the method will return
'Systempreference' (the name of the module) instead of the value of the row in
DB.
I have found at least 1 place where it can cause issue:
In C4::Context->set_preference:
601 my $syspref = Koha::Config::SysPrefs->find( $var );
602 my $type = $syspref ? $syspref->type() : undef;
603
604 $value = 0 if ( $type && $type eq 'YesNo' && $value eq '' );
type will always be 'Systempreference' and the YesNo pref will be set to an
empty string '' instead of 0.
Referenced Bugs:
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13967
[Bug 13967] Add package for System preferences
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list