Commit afc3298a authored by Mathieu Lutfy's avatar Mathieu Lutfy Committed by Aegir user

extdir: PHP7 compat fix (do not sizeof on NULL)

parent 3db55c28
......@@ -346,15 +346,19 @@ function _extdir_get_releases($id) {
->propertyCondition('status', '1')
->fieldCondition('field_extension_nr_crm', 'nid', $id);
$result = $query->execute();
if (sizeof($result['node'])) {
if (!empty($result['node'])) {
$relids = array_keys($result['node']);
foreach ($relids as $relid) {
$release = node_load($relid);
$version = $release->field_extension_release_version[LANGUAGE_NONE][0]['value'];
$releases[] = str_replace('Version ', '', $version);
}
return array($releases, $release);
}
return array($releases, NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment