[Bug 4108] New: GetMember generating invalid SQL
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 Summary: GetMember generating invalid SQL Product: Koha Version: HEAD Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Patrons AssignedTo: colin.campbell@ptfs-europe.com ReportedBy: colin.campbell@ptfs-europe.com Estimated Hours: 0.0 Change sponsored?: --- Lots of errors being generated by C4/Members.pm over invalid SQL and fetching from invalid statement handles - Cause is not handing when a parameter is passed as undefined causing it to write where x = NULL into the query. As success of preparing the statement is not tested data is then fetched from an invalid handle. Results in calling code are ubdefined (in some cases an error in others potentially a more subtle bug. Also parameters are being passed as a hash is safer to pass them as a hashref so that errors tend to be caught at compile time rather than runtime. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-02-04 14:40:18 --- Created an attachment (id=1530) --> (http://bugs.koha.org/cgi-bin/bugzilla3/attachment.cgi?id=1530) Proposed Patch -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent --- Comment #2 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-02-04 14:45:02 --- Patch sent - This addresses the immediate problem however a better patch is possible but should be accompanied by some work to endure a consistent interface to Members.pm However the impact of that suggests a future enhancement rather than adding it in the final stage of 3.2 -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com Status|NEW |ASSIGNED --- Comment #3 from Galen Charlton <gmcharlt@gmail.com> 2010-02-04 15:03:30 --- (In reply to comment #2)
Patch sent - This addresses the immediate problem however a better patch is possible but should be accompanied by some work to endure a consistent interface to Members.pm However the impact of that suggests a future enhancement rather than adding it in the final stage of 3.2
Hasn't shown up on koha-patches yet, fwiw. At any rate, if you submitted the patch attached to this bug, I'm not seeing how the 'where' keyword gets added to the query. Also, any chance of supplying test cases with your patch? -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1530 is|0 |1 obsolete| | --- Comment #4 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-02-04 18:30:25 --- Created an attachment (id=1531) --> (http://bugs.koha.org/cgi-bin/bugzilla3/attachment.cgi?id=1531) Patch (from the correct branch) Attached an incorrect version of the patch. This is the real beast -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 --- Comment #5 from Colin Campbell <colin.campbell@ptfs-europe.com> 2010-02-04 18:32:07 --- Will look at supplying test for the patch -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 --- Comment #6 from Galen Charlton <gmcharlt@gmail.com> 2010-02-05 13:29:17 --- Patch pushed to HEAD for inclusion in 3.2. -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4108 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@kohaorg.ec2.liblime.com