[Koha-bugs] [Bug 11338] New: wrong SQL in DelItemCheck

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 4 17:03:55 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11338

            Bug ID: 11338
           Summary: wrong SQL in DelItemCheck
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Cataloging
          Assignee: gmcharlt at gmail.com
          Reporter: fridolyn.somers at biblibre.com
        QA Contact: testopia at bugs.koha-community.org
                CC: m.de.rooy at rijksmuseum.nl

In C4::Items::DelItemCheck, there are two SQL queries : one to check if item is
on loan, the other if item is reserved.
Those two queries use "SELECT * FROM table", fetch the datas with "$var =
$sth->fetchrow", and use "$var" as a boolean condition.
This is not correct, SQL query should be "SELECT COUNT(*) FROM table".

Code actually works, but is dangerous.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list