Skip to content

Commit

Permalink
Merge pull request #1198 from tripal/1195-tv3-php7.0comp
Browse files Browse the repository at this point in the history
PHP 7.0 fix for explode
  • Loading branch information
spficklin committed Apr 24, 2021
2 parents 0be583c + c8acca9 commit 2f40d93
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class TripalContentService_v0_1 extends TripalWebService {
// key/value pairs should be added directly to the response.
if (is_array($values[0])) {
if (array_key_exists('@type', $values[0])) {
[$vocabulary, $accession] = explode(':', $values[0]['@type']);
list($vocabulary, $accession) = explode(':', $values[0]['@type']);
$term = tripal_get_term_details($vocabulary, $accession);
$resource->addContextItem($term['vocabulary']['short_name'], $term['vocabulary']['sw_url']);
$resource->addContextItem($values[0]['@type'], $term['url']);
Expand Down Expand Up @@ -476,7 +476,7 @@ class TripalContentService_v0_1 extends TripalWebService {
continue;
}
if ($key == '@type') {
[$vocabulary, $accession] = explode(':', $value);
list($vocabulary, $accession) = explode(':', $value);
$tterm = tripal_get_term_details($vocabulary, $accession);
$member->addContextItem($tterm['vocabulary']['short_name'], $tterm['vocabulary']['sw_url']);
$member->addContextItem($value, $tterm['url']);
Expand Down

0 comments on commit 2f40d93

Please sign in to comment.