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@gmail.com Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@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.