DHTMLX / connector-php

PHP extension for the DHTMLX library
http://dhtmlx.com/docs/products/dhtmlxConnector/index.shtml
GNU General Public License v3.0
26 stars 28 forks source link

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

Open casa10 opened 9 years ago

casa10 commented 9 years ago

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