Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-3.x-dev
Component:
fieldgroup.module
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
15 Jun 2011 at 10:52 UTC
Updated:
28 Apr 2012 at 20:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
gaurishankarI faced that warning when edit the content type that has cck multigroup field. Have you any solution?
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 315.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 315.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 315.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 315.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 315.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 315.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
warning: array_keys() [function.array-keys]: The first argument should be an array in /home8/sumitmis/public_html/trustedpeer/sites/all/modules/cck/modules/content_multigroup/content_multigroup.node_form.inc on line 281.
Comment #2
RobertoGA commentedI was the same, the message appears if there are no required fields in the multigroup ... I have placed a required field inside multigroup and the warnings no longer jumps.
You can see http://drupal.org/node/1097548 if you need more help, they have talked for a while about this problem, good luck.
Comment #3
gaurishankarHey,
I had fixed this warning with this one file or this listed patch. This is the patch corrected file you just have to replace with this one. It works good and tested.
Or
You can make patch file with replacing this one
@@ -278,10 +278,12 @@
*/
function content_multigroup_node_form_pre_render(&$form) {
foreach ($form['#multigroups'] as $group_name => $group_fields) {
- $required_fields = array_keys($form['#multigroup_required_fields'][$group_name]);
- if (!empty($required_fields)) {
- content_multigroup_node_form_fix_required($form[$group_name], $required_fields, TRUE);
- }
+ if ( !empty( $form['#multigroup_required_fields'][$group_name] ) ) {
+ $required_fields = array_keys($form['#multigroup_required_fields'][$group_name]);
+ if (!empty($required_fields)) {
+ content_multigroup_node_form_fix_required($form[$group_name], $required_fields, TRUE);
+ }
+ }
}
return $form;
}
@@ -312,10 +314,12 @@
// form for an 'Add more values' request.
$required = !empty($form_state['multigroup_add_more']);
foreach ($form['#multigroups'] as $group_name => $group_fields) {
- $required_fields = array_keys($form['#multigroup_required_fields'][$group_name]);
- if (!empty($required_fields)) {
- content_multigroup_node_form_fix_required($form[$group_name], $required_fields, $required);
- }
+ if ( !empty( $form['#multigroup_required_fields'][$group_name] ) ) {
+ $required_fields = array_keys($form['#multigroup_required_fields'][$group_name]);
+ if (!empty($required_fields)) {
+ content_multigroup_node_form_fix_required($form[$group_name], $required_fields, $required);
+ }
+ }
}
Comment #5
omar alahmedIt's working perfectly, thanks very much.
Comment #6
fizk commentedThis hasn't been committed yet.
Comment #7
yched commentedCommitted the attached patch. Thanks !