Skip to content

Commit

Permalink
initializing the superprops variable as an empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Ylikotila committed Jan 8, 2018
1 parent 43d19f9 commit 7fdcb18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/Concept.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,13 @@ public function getProperties()
}

// look for superproperties in the current graph
$superprops = null;
$superprops = array();
foreach ($this->graph->allResources($prop, 'rdfs:subPropertyOf') as $subi) {
$superprops[] = $subi->getUri();
}

// also look up superprops in the default graph if not found in current vocabulary
if(!$superprops) {
if(!$superprops || empty($superprops)) {
$superprops = $this->model->getDefaultSparql()->querySuperProperties($longUri);
}

Expand Down

0 comments on commit 7fdcb18

Please sign in to comment.