Skip to content

Instantly share code, notes, and snippets.

@dsnopek
Created May 22, 2014 15:44
Show Gist options
  • Save dsnopek/ba2b9e447b89dd902514 to your computer and use it in GitHub Desktop.
Save dsnopek/ba2b9e447b89dd902514 to your computer and use it in GitHub Desktop.
@@ -518,9 +668,9 @@ function anninc_atrium_spaces_get_nid_from_storeid($storeid) {
$result = $query->execute();
// Grab store ID and return.
- if (is_array($result) && count($result) && !empty($result['node'])) {
- $store = array_shift($result['node']);
- return $store->nid;
+ if (is_array($result) && !empty($result['node'])) {
+ $nids = array_keys($result['node']);
+ return $nids[0];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment