Skip to content

Commit

Permalink
Fixed "undefined offset" issues #119 #118
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Tunkiewicz committed Jul 25, 2014
1 parent ce6edd3 commit 593f1a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Bllim/Datatables/Datatables.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct() {
$this->input['columns'] = array();
for($i=0;$i<Input::get('iColumns',0);$i++) {
$arr = array();
$arr['name'] = $columns[$i];
$arr['name'] = isset($columns[$i]) ? $columns[$i] : '';
$arr['searchable'] = Input::get('bSearchable_'.$i,'');
$arr['search'] = array();
$arr['search']['value'] = Input::get('sSearch_'.$i,'');
Expand Down Expand Up @@ -517,7 +517,7 @@ protected function filtering()
if ($this->input['columns'][$i]['orderable'] == "true")
{
// if filter column exists for this columns then use user defined method
if (isset($this->filter_columns[$columns_copy[$i]]))
if (isset($columns_copy[$i]) && isset($this->filter_columns[$columns_copy[$i]]))
{
// check if "or" equivalent exists for given function
// and if the number of parameters given is not excess
Expand Down Expand Up @@ -579,7 +579,7 @@ protected function filtering()
if ($this->input['columns'][$i]['orderable'] == "true" && $this->input['columns'][$i]['search']['value'] != '')
{
// if filter column exists for this columns then use user defined method
if (isset($this->filter_columns[$columns_copy[$i]]))
if (isset($columns_copy[$i]) && isset($this->filter_columns[$columns_copy[$i]]))
{
call_user_func_array(
array(
Expand Down

0 comments on commit 593f1a2

Please sign in to comment.