Browse Source

Issue #72: Updating API to include 2.1 improvements: f7c23ae

Stephen Ficklin 7 years ago
parent
commit
d4d21fb5f5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tripal_chado/includes/TripalImporter/FASTAImporter.inc

+ 2 - 2
tripal_chado/includes/TripalImporter/FASTAImporter.inc

@@ -631,7 +631,7 @@ class FASTAImporter extends TripalImporter {
       }
 
       // If the feature exists but this is an "insert only" then skip.
-      if ($feature and (strcmp($method, 'Insert only') == 0)) {
+      if (isset($feature) and (strcmp($method, 'Insert only') == 0)) {
         $this->logMessage("Feature already exists '!name' ('!uname') while matching on !type. Skipping insert.",
           array('!name' => $name,'!uname' => $uname,'!type' => drupal_strtolower($match_type)), TRIPAL_WARNING);
         return 0;
@@ -692,7 +692,7 @@ class FASTAImporter extends TripalImporter {
     }
 
     // if we do have a feature and this is an update then proceed with the update
-    if ($feature and !$inserted and (strcmp($method, 'Update only') == 0 or strcmp($method, 'Insert and update') == 0)) {
+    if (isset($feature) and !$inserted and (strcmp($method, 'Update only') == 0 or strcmp($method, 'Insert and update') == 0)) {
 
       // if the user wants to match on the Name field
       if (strcmp($match_type, 'Name') == 0) {