Missing $ret in update 6202
TCRobbert - August 24, 2009 - 08:49
| Project: | Domain Access |
| Version: | 6.x-2.0-rc9 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Just updated to RC9. Unfortunately update.php returned the following:
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /xxx/xxx/public_html/update.php on line 174.
* warning: Invalid argument supplied for foreach() in /xxx/xxx/public_html/update.php on line 338.
Which resulted in:
The following queries were executed
domain module
Update #6202
* No queries
Running the latest drupal with many modules on the latest dot deb.

#1
I think this is caused by the update function not returning an array - it should return an empty array.
So everything works - the update function just fails to mention that to Drupal and Drupal therefor thinks it needs to go and throw errors.
#2
Yes. True. You can safely ignore the error message. The function should be:
function domain_update_6202() {$ret = array();
$options = variable_get('domain_form_elements', array());
if (isset($options['author'])) {
unset($options['author']);
}
if (isset($options['menu'])) {
unset($options['menu']);
}
variable_set('domain_form_elements', $options);
return $ret;
}
#3
Fixed. Looks like we need an rc10. Grrrr.
#4
Title change for links.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.