Koha-clms/catalogue
Mark Tompsett 91fb5fd2bc Bug 8175 - check logs error or displays incorrectly in details.pl
Changed "$item->{'materials'} ne ''" to
"defined($item->{'materials'}) && $item->{'materials'} =~ /\S/"
in if condition to prevent error when it is NULL, and to
properly capture the intent of printing if there is something
visible.

Cases tested include NULL, '0', '', ' ', and 'blah' by using
 UPDATE items SET materials=NULL where biblionumber=19158;
where the biblionumber was chosen randomly, because only NULL
was in the items.materials field. The NULL case triggers an
error, but it does display correctly.

The ' ' case displays an apparently empty column, which does not
seem to be the intent of the flag that is being set. This is why
a simple $var check is not sufficient.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2012-10-14 20:32:54 +13:00
..
ISBDdetail.pl Bug 5729 - Add CoinS to intranet 2011-12-27 18:37:20 +01:00
MARCdetail.pl Bug 5729 - Add CoinS to intranet 2011-12-27 18:37:20 +01:00
cardview.pl Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
detail.pl Bug 8175 - check logs error or displays incorrectly in details.pl 2012-10-14 20:32:54 +13:00
detailprint.pl Bug 6050 Make calls to GetItemsInfo consistent 2011-06-14 14:12:02 +12:00
export.pl Bug 7345: Enable exporting records sans private fields 2012-02-13 11:32:18 +01:00
image.pl Bug 8255: allow local cover images to be cached 2012-06-26 13:37:25 +12:00
imageviewer.pl Bug 1633: QA follow-up 2012-01-24 11:16:10 +01:00
issuehistory.pl Bug 5549 : Fix a couple of date issues from testing 2012-03-20 13:22:12 +13:00
labeledMARCdetail.pl Bug 5791 - Robust handling of deleted/non-existent biblios and authority records 2011-04-20 12:03:59 +12:00
moredetail.pl Bug 7733 - HidePatronName not working on moredetail 2012-04-19 11:05:09 +02:00
search.pl Bug 7310: Code changes for Improving list permissions 2012-03-21 16:46:40 +01:00
showmarc.pl Merge remote-tracking branch 'origin/master' into new/bug_6679 2011-12-08 10:08:44 +01:00
updateitem.pl Bug 6296: allow users to be authenticated by SSL client certs 2012-03-19 17:02:44 +01:00