Browse Source

Merge pull request #1096 from tripal/7.x-3.x-1088-array_key_exists_on_object

Use property exists instead of array_key_exists
Stephen Ficklin 4 years ago
parent
commit
d70f3e7fbc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tripal_chado/api/tripal_chado.variables.api.inc

+ 1 - 1
tripal_chado/api/tripal_chado.variables.api.inc

@@ -791,7 +791,7 @@ function chado_expand_var($object, $type, $to_expand, $table_options = []) {
       $foreign_table = $to_expand;
 
       // BASE CASE: don't expand the table it already is expanded
-      if (array_key_exists($foreign_table, $object)) {
+      if (property_exists($object, $foreign_table)) {
         return $object;
       }
       $foreign_table_desc = chado_get_schema($foreign_table);