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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://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/

Reply via email to