Return the found term instead of true in has_term.

pull/3787/head
Isaac Connor 2023-11-15 20:32:49 -05:00
parent 8e0793f5e7
commit 40975184e0
1 changed files with 1 additions and 1 deletions

View File

@ -1259,7 +1259,7 @@ class Filter extends ZM_Object {
public function has_term($attr, $op=null) {
foreach ($this->terms() as $term) {
if (($term['attr'] == $attr) and ((!$op) or ($term['op']==$op)) ) return true;
if (($term['attr'] == $attr) and ((!$op) or ($term['op']==$op)) ) return $term;
}
return false;
}