Skip to content

Commit 0bd0c03

Browse files
committed
Fix for function call from empty
1 parent 431d013 commit 0bd0c03

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

easy_xmlsitemap.module

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ function easy_xmlsitemap_build_taxonomy_items($base_url) {
268268
->execute();
269269

270270
foreach ($result as $term) {
271-
// add term only if have nodes assigned to
272-
if (!empty(taxonomy_select_nodes($term->tid))) {
273-
271+
// add term only if have nodes assigned to
272+
$array_of_nodes = taxonomy_select_nodes($term->tid);
273+
274+
if (!empty($array_of_nodes)) {
275+
274276
$url = $base_url . url('taxonomy/term/' . $term->tid, array('absolute' => FALSE, 'language' => (object)array('langcode' => $language->langcode)));
275277
$langcode = $language->langcode;
276278

0 commit comments

Comments
 (0)