Project

General

Profile

« Previous | Next » 

Revision 1603

bin/tapir/tapir2flat.php: Fixed bug in row assembly where XML elements that weren't found were left out of the array, causing the columns to shift to the left

View differences:

bin/tapir/tapir2flat.php
208 208
      $fields = array();
209 209
      foreach(array_keys($supportedConcepts) as $key){
210 210
        $element = $record->getElementsByTagName($key);
211
        if($element->length > 0) {
212
          $fields[] = $element->item(0)->nodeValue;
213
        }
211
        $fields[] = $element->length > 0 ? $element->item(0)->nodeValue : "";
214 212
      }
215 213
      fputcsv($flat_file,$fields,$seperator);
216 214
    }

Also available in: Unified diff