From: Adam Dickmeiss Date: Thu, 16 Aug 2007 11:30:45 +0000 (+0000) Subject: Fixed bug #1358: md-title-remainder may or may not be present in test. X-Git-Tag: PAZPAR2.1.0.2~7 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=c0ea19d809710671b1d55d4fb9d7a6513bc80e27;p=pazpar2-moved-to-github.git Fixed bug #1358: md-title-remainder may or may not be present in test. The xmlNodeListGetString in some cases returns NULL and other cases return "" for what seems to be same input. --- diff --git a/src/logic.c b/src/logic.c index 45a5d0e..4146612 100644 --- a/src/logic.c +++ b/src/logic.c @@ -1,4 +1,4 @@ -/* $Id: logic.c,v 1.60 2007-08-13 13:27:04 adam Exp $ +/* $Id: logic.c,v 1.61 2007-08-16 11:30:45 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -1158,7 +1158,7 @@ struct record *ingest_record(struct client *cl, Z_External *rec, type = xmlGetProp(n, (xmlChar *) "type"); value = xmlNodeListGetString(xdoc, n->children, 1); - if (!type || !value) + if (!type || !value || !*value) continue; md_field_id