Skip to content

Commit 913d139

Browse files
fixed premature end of parse due to blank entry
1 parent 108801d commit 913d139

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bioportal/bioportal.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ function OBO2RDF($abbv)
394394
$graph_uri = '<'.parent::getRegistry()->getFQURI(parent::getGraphURI()).'>';
395395
$bid = 1;
396396

397-
while($l = parent::getReadFile()->read()) {
397+
while(FALSE !== ($l = parent::getReadFile()->read())) {
398398
$lt = trim($l);
399399
if(strlen($lt) == 0) continue;
400400
if($lt[0] == '!') continue;
@@ -676,7 +676,8 @@ function OBO2RDF($abbv)
676676
} else {
677677
//header
678678
//format-version: 1.0
679-
$buf .= parent::triplifyString($ouri,"obo_vocabulary:$a[0]",str_replace( array('"','\:'), array('\"',':'), isset($a[1])?$a[1]:""));
679+
$buf .= parent::triplifyString($ouri,"obo_vocabulary:$a[0]",
680+
str_replace( array('"','\:'), array('\"',':'), isset($a[1])?$a[1]:""));
680681
}
681682

682683
if($minimal || $minimalp) parent::getWriteFile()->write($min);

0 commit comments

Comments
 (0)