欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

Warning: Illegal string offset 'parent' in cck/modules/fieldgroup/fieldgroup.module on line 607

After updating to php 5.4 i have this error when I create a new filed in a content type.
"warning: Illegal string offset 'parent' in /cck/modules/fieldgroup/fieldgroup.module on line 607 "

Passages to reproduce:

  1. in the page of content type, add a new field
  2. in the next page, where you can configure the new field, is written for five times the error "warning: Illegal string offset 'parent' in .../cck/modules/fieldgroup/fieldgroup.module on line 607 "

Can someone help me please?

Files: 

 

diff --git a/modules/fieldgroup/fieldgroup.module b/modules/fieldgroup/fieldgroup.module
index 6b5b170..23c4f55 100644
--- a/modules/fieldgroup/fieldgroup.module
+++ b/modules/fieldgroup/fieldgroup.module
@@ -438,7 +438,7 @@ function fieldgroup_field_overview_form_validate($form, &$form_state) {
     // to get weights the user doesn't expect.
 
     foreach ($form_values as $key => $values) {
-      if ($values['parent'] == '_add_new_group') {
+      if (isset($values['parent']) && $values['parent'] == '_add_new_group') {
         form_set_error('_add_new_group][label', t('Add new group: you need to provide a label.'));
         form_set_error('_add_new_group][group_name', t('Add new group: you need to provide a group name.'));
         break;


Comments
ea2391’s picture

 

No one can help me? No one experienced this issue?

ea2391’s picture

 

Haven't looked into it yet, but I can confirm the issue.

ea2391’s picture

 

Issue summary:View changes
Issue tags: +PHP 5.4
 
Michelle’s picture

 

Version:6.x-3.0-alpha3» 6.x-2.x-dev
Status:Active» Needs review
FileSize
754 bytes

My patch is against the 2.x branch but it sounds like the same code is in the 3.x branch so it should be able to be adapted for that easily enough.

DamienMcKenna’s picture

 


普通分类: