Skip to content

Commit

Permalink
Fix for function call from empty
Browse files Browse the repository at this point in the history
  • Loading branch information
findlabnet committed Aug 20, 2016
1 parent 431d013 commit 0bd0c03
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions easy_xmlsitemap.module
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,11 @@ function easy_xmlsitemap_build_taxonomy_items($base_url) {
->execute();

foreach ($result as $term) {
// add term only if have nodes assigned to
if (!empty(taxonomy_select_nodes($term->tid))) {

// add term only if have nodes assigned to
$array_of_nodes = taxonomy_select_nodes($term->tid);

if (!empty($array_of_nodes)) {

$url = $base_url . url('taxonomy/term/' . $term->tid, array('absolute' => FALSE, 'language' => (object)array('langcode' => $language->langcode)));
$langcode = $language->langcode;

Expand Down

0 comments on commit 0bd0c03

Please sign in to comment.