diff --git a/phpxpress/Table.php b/phpxpress/Table.php index 4ba86da..26d8147 100644 --- a/phpxpress/Table.php +++ b/phpxpress/Table.php @@ -1,7 +1,7 @@ dataSource)) + throw new BadFunctionCallException("Cannot add datasource to a Table already having a datasource"); + if(empty($dataSource)){ $this->dataSource = []; return; } - if(isset($this-> dataSource)) - throw new BadFunctionCallException("Cannot add datasource to a Table already having a datasource"); - - $is_array_of_arrays; // if false, the datasource is an array of object(s) if(is_object($dataSource[0])){ $is_array_of_arrays = false;