PHP Fatal error on BaseQuery::execute() error
Because SelectQuery::fetch() and its brethren call PDO::fetch() this way
$this->execute()->fetch();
any time execute() fails and returns false instead of an object, the PHP script terminates with a fatal PHP error, with a message like this:
Thu Jun 20 13:38:38 2013] [error] [client fe80::1] PHP Fatal error: Call to a member function fetchAll() on a non-object in FluentPDO/SelectQuery.php on line 115
Could better error handling be implemented?
Actually, the PDO::prepare($query) call should catch the error that caused this, but again, there is no way I can see to catch that error in the user code.
could be if someone write a pull request ;-)
Working on it! :-)
Sorry if the pull requests are messed up. The new Github interface confuses me as to just exactly what it's going to do sometimes.
I'm facing the same issue using fluentpdo. i extend the class as a base model and i cant seem to figure out why it stopped woking. please help
@skipperstrange can you add the code you're using to extend fluent?