tags:

views:

54

answers:

1

Ugh, got this unexpected error:

Argument 1 passed to QMySqliDatabaseResult::__construct() must be an instance of mysqli_result, boolean given, called in /home/aptana/domains/staging-allyforce.aptanacloud.com/web/htdocs/includes/qcodo/_core/database/QMySqli5Database.class.php on line 52 and defined
Error Type:   Unknown 

I'm not sure what happened, it worked fine earlier, still trying to figure out how to reproduce.

Line 420:           public function __construct(mysqli_result $objResult, QMySqliDatabase $objDb) {
Line 421:               $this->objMySqliResult = $objResult;
Line 422:               $this->objDb = $objDb;
Line 423:           }
A: 

It looks pretty plain in the error message. You're constructing an object and passing it a boolean value instead of a mysqli_result object. This violates the type, so you're getting a type hinting error. (My guess is you're getting a mysqli_result object from somewhere, assigning it to a boolean variable, then passing that variable in to the constructor.)

Can you show the line where you construct the object, causing the error to be thrown?

Conspicuous Compiler
Yeah, that's what's confusing because not sure why it would be assigning a boolean variable. Hunting it down....
Angela