Undefined property: stdClass::$db
I am sending PUT request on http://localhost/ci/index.php/api/Key but getting this error.
A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$db Filename: api/Key.php Line Number: 244
Database is auto loaded and key table is created
Facing the same error.
Could you please join the autoload file and the line which facing the error ? (244 so a bit before and a bit after to understand all)
Thanks
Try adding a construct to the top of the Key file.
function __construct() { // Construct the parent class parent::__construct(); }
i have the same problem. i tested add constructor but didnt help