Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

Commit

Permalink
fixed PHP notice when displaying sections with custom taxonomies havi…
Browse files Browse the repository at this point in the history
…ng no specific terms
  • Loading branch information
zyml committed May 21, 2013
1 parent 04e31ee commit 4563c52
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions library/classes/postviews-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,14 @@ protected function parse_query_args() {
break;

default :
$_query_args[ 'tax_query' ][] = array (
'taxonomy' => $this->settings[ 'taxonomy' ],
'field' => 'id',
'terms' => $this->settings[ 'terms' ],
'operator' => 'AND',
);
if ( !empty($this->settings[ 'terms '] ) ) {
$_query_args[ 'tax_query' ][] = array (
'taxonomy' => $this->settings[ 'taxonomy' ],
'field' => 'id',
'terms' => $this->settings[ 'terms' ],
'operator' => 'AND',
);
}

endswitch;

Expand Down

0 comments on commit 4563c52

Please sign in to comment.