Last modified: 2014-10-01 01:31:37 UTC
If SQLite is used, setting $wgDebugDBTransactions = true in LocalSettings.php causes "Catchable fatal error: Object of class PDO could not be converted to string in <path to MediaWiki installation>/includes/db/Database.php on line 3850"
Thanks for taking the time to report this! Setting https://www.mediawiki.org/wiki/Manual:$wgShowExceptionDetails and pasting more information here is welcome.
That doesn't yield any additional information.
I can't reproduce this bug on an up-to-date MediaWiki installation using SQLite. I added $wgDebugDBTransactions = true in the configuration. What do you do to get the error? You have to go to a specific page or do a specific action?
Jackmcbarn: What do you do to get the error? You have to go to a specific page or do a specific action?
Viewing any page causes the error for me. This still happens with latest git, except the error is on line 4096 now (which is still "return (string)$this->mConn;"). This happens with PHP 5.4.22 (with XAMPP 1.8.2) in case that helps.
I've faced the same issue. The problem starts in debug message: includes/objectcache/SqlBagOStuff.php:147: if ( $wgDebugDBTransactions ) { wfDebug( sprintf( "Connection %s will be used for SqlBagOStuff\n", $db ) ); } that calls __toString method for $db: includes/db/Database.php: public function __toString() { return (string)$this->mConn; } I use MySQL database and in my case $this->mConn is an object of type mysqli that can't be converted to String. To print type of connection I've changed return expression to $this->getType() but not sure what behaviour was intended. My config: MediaWiki 1.22.0 (80d6477)