Skip to content

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

@casa10

Description

@casa10

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions