diff --git a/Controller/Component/DataTableComponent.php b/Controller/Component/DataTableComponent.php index c238eed..a48314b 100644 --- a/Controller/Component/DataTableComponent.php +++ b/Controller/Component/DataTableComponent.php @@ -231,7 +231,7 @@ private function getWhereConditions(){ foreach($fields as $x => $column){ // only create conditions on bSearchable fields - if( $this->controller->request->query['bSearchable_'.$x] == 'true' ){ + if (isset($this->controller->request->query['bSearchable_'.$x])) { // check if the parameter exists in query. if($this->mDataProp == true){ $conditions['OR'][] = array( @@ -268,7 +268,7 @@ private function getWhereConditions(){ } } } - } + } } return $conditions; } @@ -396,4 +396,4 @@ public function getTimes(){ return $times; } -} \ No newline at end of file +}