|
@@ -1023,6 +1023,11 @@ class OBOImporter extends TripalImporter {
|
|
|
['!id' => $id]));
|
|
|
}
|
|
|
$results = drupal_json_decode($response->data);
|
|
|
+ if (!$results){
|
|
|
+ $this->logMessage('Error: no data with !url. The response was: !response', ['!url' => $full_url, '!response' => $response]);
|
|
|
+
|
|
|
+ return FALSE;
|
|
|
+ }
|
|
|
|
|
|
// If EBI sent an error message then throw an error.
|
|
|
if ($results['error']) {
|
|
@@ -1746,6 +1751,10 @@ class OBOImporter extends TripalImporter {
|
|
|
else {
|
|
|
$stanza = $this->findEBITerm($id);
|
|
|
|
|
|
+ if (!$stanza){
|
|
|
+ return FALSE;
|
|
|
+ }
|
|
|
+
|
|
|
// Make sure the DBs and CVs exist and are added to our cache.
|
|
|
$this->addDB($stanza['db_name'][0]);
|
|
|
$this->addCV($stanza['namespace'][0]);
|