I was trying to do a drush site-install and got the below error.
Error: Cannot use object of type stdClass as array in drupal_rewrite_settings() (line 329 of /app/web/core/includes/install.inc) #0 /app/web/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php(267): drupal_rewrite_settings(Array)
#1 [internal function]: Drupal\Core\Installer\Form\SiteSettingsForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
So it felt like it wasn't happy with settings.php one of the values is being set wrong, turned out it was this code:
$databases['default']['default']['driver'] = $_ENV['MYSQL_DRIVER'];
$databases['default']['default']['namespace'] = 'Drupal\\Core\\Database\\Driver\\' . $_ENV['MYSQL_DRIVER'];
Not 100% the correct way to use different database drivers, but for now took this code out and it started to work.
Add new comment