开发者

unexpected mysql error saying must be an instance of mysqli_result?

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/q开发者_开发问答codo/_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:           }


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜