Koha/catalogue
Mark Tompsett b8f4b1fa14 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>
2012-10-12 21:25:45 +02: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-12 21:25:45 +02: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
getitem-ajax.pl Bug 7175: Allow to choose which items to receive 2012-05-21 17:46:07 +02:00
image.pl Bug 8255: allow local cover images to be cached 2012-06-25 18:12:29 +02:00
imageviewer.pl Bug 4321: clean C4::Biblio::GetBiblio and uses 2012-09-18 12:11:54 +02:00
ISBDdetail.pl Bug 5729 - Add CoinS to intranet 2011-12-27 18:37:20 +01:00
issuehistory.pl Bug 4321: clean C4::Biblio::GetBiblio and uses 2012-09-18 12:11:54 +02:00
labeledMARCdetail.pl Bug 5791 - Robust handling of deleted/non-existent biblios and authority records 2011-04-20 12:03:59 +12:00
MARCdetail.pl Bug 8481: Items table is showing in opac-MARCdetail.pl but not in MARCdetail.pl 2012-10-05 17:40:22 +02:00
moredetail.pl Bug 5339: Invoices management improvement 2012-09-18 22:42:15 +02:00
search.pl Bug 4491: fix weird code in search scripts 2012-09-17 18:19:48 +02: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