diff --git a/tableeditor.class.php b/tableeditor.class.php index 1caabf70..a084490d 100644 --- a/tableeditor.class.php +++ b/tableeditor.class.php @@ -945,7 +945,6 @@ class TableEditor if(is_callable(array($this->classname, 'tableEditorGetList'))) { list($sel, $from, $where) = call_user_func(array($this->classname, 'tableEditorGetList'), &$this); } else { - echo "Calling default func\n"; list($sel, $from, $where) = $this->defaultGetList(); } @@ -953,7 +952,9 @@ class TableEditor $query .= " FROM "; foreach($from as $f) $query .= "$f "; $query .= " WHERE 1 "; - foreach($where as $w) $query .= "AND $w "; + if(is_array($where)) { + foreach($where as $w) $query .= "AND $w "; + } if($this->sortField()) $query.=" ORDER BY ".$this->sortField()."";