drush si -y default (or minimal)

WD php: Warning: Parameter 3 to install_configure_form() expected to be a reference, value given in drupal_retrieve_form() (line 581 of                 [warning]
/var/www/drupal/includes/form.inc).                                                                                                                              
WD php: Warning: implode(): Invalid arguments passed in form_error() (line 1202 of /var/www/drupal/includes/form.inc).                                  [warning]
WD php: Warning: implode(): Invalid arguments passed in form_error() (line 1202 of /var/www/drupal/includes/form.inc).                                  [warning]
WD php: Warning: implode(): Invalid arguments passed in form_error() (line 1202 of /var/www/drupal/includes/form.inc).                                  [warning]
WD php: Warning: array_merge(): Argument #1 is not an array in install_configure_form_submit() (line 1740 of /var/www/drupal/includes/install.core.inc).[warning]
Parameter 3 to install_configure_form() expected to be a reference, value given in drupal_retrieve_form() (line 581 of                                  [warning]
/var/www/drupal/includes/form.inc).                                                                                                                              
implode(): Invalid arguments passed in form_error() (line 1202 of /var/www/drupal/includes/form.inc).                                                   [warning]
implode(): Invalid arguments passed in form_error() (line 1202 of /var/www/drupal/includes/form.inc).                                                   [warning]
implode(): Invalid arguments passed in form_error() (line 1202 of /var/www/drupal/includes/form.inc).                                                   [warning]
array_merge(): Argument #1 is not an array in install_configure_form_submit() (line 1740 of /var/www/drupal/includes/install.core.inc).                 [warning]
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

PHP 5.3.1 (cli) (built: Feb 2 2010 01:00:04)

drush and core both HEAD.

drewish’s picture

subscribing. ran into this today.

chx’s picture

chx’s picture

Status: Closed (duplicate) » Active

Still happens. :(

marvil07’s picture

Title: drush si throws warning on site install » PHP 5.3 warning for command line install
Project: Drush » Drupal core
Version: » 7.x-dev
Component: Code » install system
Issue tags: +PHP 5.3
FileSize
1.05 KB

I changed the parameters at function definitions to avoid the & on the non-modified values at two functions.

marvil07’s picture

Status: Active » Needs review
moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Nice debugging.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow. That's esoteric. Nice find!

Committed to HEAD. Thanks!

David_Rothstein’s picture

Status: Fixed » Needs work

Nice debugging! But the fix isn't correct - why should $form_state and $install_state have a different behavior? With $form_state the similar bug was fixed in the calling code, and we need to do that here as well. Also, the committed patch doesn't fix install_settings_form() which has the same exact bug...

Please review #756034: install.core.inc make impossible to use cli install because of install_settings_form signature which attempts to fix this in the calling code.

The commit here didn't break anything since $install_state wasn't being modified, but the intention is that it can be modified - again, just like $form_state. I'm not sure it's a rule, but it seems like we always use &$form_state in all/most form functions for consistency sake (even when we aren't modifying it), so we should probably do the same thing with $install_state. If so, we should roll this patch back once the other issue gets in.

David_Rothstein’s picture

chx also posted #778888: Form functions can't take arguments by reference which is related to this issue.

marvil07’s picture

Status: Needs work » Needs review
FileSize
3.38 KB

Actually, chx suggest me to review where is the exact problem, because like David suggests the real problem is not on install functions, but install is really big ;-)

So, I tried the patch at #3 in #756034: install.core.inc make impossible to use cli install because of install_settings_form signature, and it also solves the problem, and I think in a cleaner way(aka solving the real problem), so I just rerolled the patch to revert my change and apply his change.

Thanks for taking care of this :-)

Status: Needs review » Needs work

The last submitted patch, install-cli-form-756034-v2.patch, failed testing.

David_Rothstein’s picture

Status: Needs work » Needs review
FileSize
3.53 KB

Looks good to me - thanks! I think the patch failed to apply because of the line that changed the $Id$ - not sure how that got in there, but here is a reroll that leaves it out.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

you guys rock.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow. Great sleuthing, folks!

Committed to HEAD! :D

chx’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
828 bytes

Almost but the comment has a small problem: you are not passing an object by reference that's quite a pointless exercise they are passed around by handle anyways which is 99.99% of the time is good enough. You pass in an array as in the code.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -PHP 5.3

Automatically closed -- issue fixed for 2 weeks with no activity.