[Koha-devel] SQL queries showing data that will cause software errors.

Barton Chittenden barton at bywatersolutions.com
Fri Sep 28 21:20:42 CEST 2018


When ByWater started upgrading our partners to 17.11 last spring, I noticed
that we were getting a lot of errors of the form

"can't call method * on an undefined value at ..."

We're starting to see these errors because more and more of our code uses
Koha objects, and these will fail if a method is called on an undefined
object.

I brought this up here:
http://lists.koha-community.org/pipermail/koha-devel/2018-June/044613.html

I think that there was also another thread about this, which I can't find
at the moment... Jonathan's opinion on this is that we should start
creating queries which find data that will fail. This thread is for those
queries, since I have an example:

Circulating or holdable items without item type

SELECT
    biblionumber,
    itemnumber,
    barcode,
    title,
    notforloan
FROM
    items
    INNER JOIN biblio USING (biblionumber)
WHERE
    notforloan < 1
    AND itype IS NULL

Once we have a few of these at hand, I'll start a page on the Koha wiki.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20180928/541b7234/attachment.html>


More information about the Koha-devel mailing list