connector-php icon indicating copy to clipboard operation
connector-php copied to clipboard

Trying to get property of non-object on db_phpci.php line 52

Open casa10 opened this issue 11 years ago • 0 comments

Hye, Just to add a problem with CI and perhaps for the others frameworks too. Log message : Trying to get property of non-object on ../connector/db_phpci.php line 52. The problem is that $res in PHPCIResultSet's constructor can be a non object because switch type database used, $this->db doesn't have object property required on PHPCIResultSet's constructor. I suggest to add this line on PHPCIResultSet's constructor : if(!is_object($res)) { $this->count = ''; $this->start = ''; } else { $this->count = $res->num_rows; $this->start = $res->current_row; } Thus, no problem in logs. Otherwise, it seems to be good for all actions but this problem is present on log message. Have a good day. Casa

casa10 avatar Oct 30 '14 19:10 casa10