Reputation: 2621
I am getting the following error:
Fatal error: Call to undefined method MDB2_Error::quoteIdentifier() The full error is this: Fatal error: Call to undefined method MDB2_Error::quoteIdentifier() in /u01/www/givebutton.net/htdocs/lib/OA/Upgrade/VersionController.php on line 51
The environment is this: PHP 5.3.6-pl0-gentoo (cli) (built: Aug 23 2011 12:37:13) I am using fastcgi and nginx ...
Solution My problem was that the user was unable to log into the database. I fixed that and poof no more error. The full code
function init($oDbh='')
{
$this->oDbh = $oDbh;
$this->versionTablename = $oDbh->quoteIdentifier($GLOBALS['_MAX']['CONF']['table']['prefix'].'application_variable', true);
}
As you see $oDbh is a database connection, and the user was not able to login to the database remotely. Fixed the perms in mysql, and it works.
Thanks for the help!
Upvotes: 0
Views: 2092
Reputation: 160883
So MDB2_Error does not have the method quoteIdentifier
. It is most probably that you tend to get the MDB2 handler but MDB2_Error has returned. Please write some check error code to prevent this.
Upvotes: 1