codeigniter-restserver icon indicating copy to clipboard operation
codeigniter-restserver copied to clipboard

Undefined property: stdClass::$db

Open uzairali001 opened this issue 9 years ago • 4 comments

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

uzairali001 avatar Apr 24 '17 06:04 uzairali001

Facing the same error.

pchambeth avatar May 02 '17 13:05 pchambeth

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

kalimerre avatar May 05 '17 21:05 kalimerre

Try adding a construct to the top of the Key file.

function __construct() { // Construct the parent class parent::__construct(); }

ChadHorn avatar May 06 '17 14:05 ChadHorn

i have the same problem. i tested add constructor but didnt help

Crustus avatar Jun 04 '17 20:06 Crustus