Hi,i have this problem when i am at Home » Administration » Structure » Heartbeat » Heartbeat templates. The code at line 3140 is $element['#checked'] = ((string) $value === (string) $return_value); any idea?

Comments

I have the same error but I am not using Heartbeat. I am using Drupal Commerce Kickstart. Does anyone know how to fix this problem?

I have a similar error with core 7.18 and content access.
I get
"Array to string conversion in form_process_checkbox() (line 3144..."

error whenever I try to set access permissions say on the Article content type. I have a generic configuration, no new content types or customization. Just core 7.18 with a list of modules installed. No content was added yet.

Forgot to mention as I think it may be the problem. My host has moved to PHP 5.4.9. Could this be a problem? I cannot revert to an earlier version of PHP

Issue tags:+Drupal

Guys,

I think problem with return value defined as array in your custom module. I checked out the Drupal 7 core code in the "includes\form.inc" file (http://api.drupal.org/api/drupal/includes!form.inc/7)

In line number: 3126 - Its a value which we set for the element
$value = $element['#value'];
For your Reference: http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.ht...

In line number: 3127 - Its a value element should return when selected
$return_value = $element['#return_value'];
For your Reference: http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.ht...

This will go to else condition if the "$element['#value']" is string and not a Boolean also not a zero. Now, i will explain why u got this error because in your case you got the return value as array. as per the line number:3144, the return value has been converted to string
line number:3144 - $element['#checked'] = ((string) $value === (string) $return_value);

Happy to receive your replies.

Warm Regards,
Venkat

Everything you have stated, Venkat, is what is written on the corresponding lines. How should the line read so that it does not produce the error in line 3144?