Created
May 22, 2014 15:44
-
-
Save dsnopek/ba2b9e447b89dd902514 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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