Symptoms:
latest code from 8.x fails to install, throwing fatal PHP error Cannot use object of type stdClass as array in .../core/includes/install.inc on line 257
Steps to reproduce:
- Get the latest 8.x source code
- Copy sites/default/default.settings.php to sites/default/settings.php
- Launch installer
- Choose English. Press Save and Continue
- Choose Standard profile. Press Save and Continue
- Proceed to database connection details screen. Press Save and Continue
- Bingo. Error 500
Analysis
Error comes from line 257 in includes/install.inc:
<?php
if (isset($current[$index])) {
?>
$current is a part of $settings array coming to drupal_rewrite_settings() from install_settings_form_submit():
(install.core.inc, lines 1109-1112)
<?php
$settings['databases'] = (object) array(
'value' => array('default'=> array('default'=> $form_state['storage']['database'])),
'required'=> TRUE,
);
?>
$current (part of $settings parameter) is an object, while drupal_rewrite_settings() expects array
I set this to critical, because this leaves installation in unusable state.
Update
Clean install without any settings.php goes just fine
Dropping existing database, and trying to re-install with automatically generated settings.php fails.