[eluser]Unknown[/eluser]
Trying to connect to a SQLite3 database on a new 2.0.3 install. Looks like 2.1.0 still has the same code, so I'm going to post my fix here for the sake of all...
Initial output:
Quote:Fatal error: [] operator not supported for strings in /var/www/system/database/DB_driver.php on line 1183
It seems that an error message is being built as an array before it is passed on, but it actually gets initialized as a string.
The fix is as follows (just a bit above line 1183):
Quote: if ($native == TRUE)
{
- $message = $error;
+ $message[] = $error;
}
else
{
- $message = ( ! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error;
+ $message[] = ( ! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error;
}
And after that, I get a much more useful error that I can use to troubleshoot my environmental problems:
Quote:A Database Error Occurred
file is encrypted or is not a database
Filename: core/Loader.php
Line Number: 268