Hello,

i figured out a bug in webform.
My hoster switched to PHP 5.4 and since then I get the following error on my basic site with added webform.

I have the date module installed to put a calandar element in webform.
Warning: Illegal string offset 'day' in form_process_date() (line 2961 of includes\form.inc.

So the form_process_date() function is part of the webform module.

does anyone have a clue to fix that issue?

thanks so much

Comments

rikibu’s picture

Title: PHP 5.4: Illegal string offset in form_process_date() on line 2961 in includes\form.inc » PHP 5.4: Webform and Date components: Illegal string offset in form_process_date() on line 2961 in includes\form.inc

Here is an update related to the problem.

I found out that the described problem is only there when PHP 5.4x is running.

In previous versions of PHP 5 , for example 5.38 webform doesnt have any problem.

it seems that there is another handling of date related stuff in PHP v5.4x so webform is creating an error.

deepbluesolutions’s picture

We are seeing this problem as well on 5.4, I agree its 5.4 related, here is a backtrace

Warning: Illegal string offset 'day' in form_process_date() (line 2961 of /var/www/drupal/public_html/includes/form.inc). Backtrace:
form_process_date(Array) date.inc:187
webform_expand_date(Array, Array, Array) form.inc:1801
form_builder('webform_client_form_255', Array, Array) form.inc:1857
form_builder('webform_client_form_255', Array, Array) form.inc:1857
form_builder('webform_client_form_255', Array, Array) form.inc:842
drupal_process_form('webform_client_form_255', Array, Array) form.inc:374
drupal_build_form('webform_client_form_255', Array) form.inc:131
drupal_get_form('webform_client_form_255', Object, Array, ) webform.module:1533
webform_node_view(Object, 'full', 'en')
call_user_func_array('webform_node_view', Array) module.inc:857
module_invoke_all('node_view', Object, 'full', 'en') node.module:1394
node_build_content(Object, 'full', 'en') node.module:1284
node_view(Object, 'full', NULL) node.module:2582
node_view_multiple(Array, 'full') node.module:1418
node_show(Object) node.module:2653
node_page_view(Object)
call_user_func_array('node_page_view', Array) menu.inc:517
menu_execute_active_handler() index.php:21

Warning: Illegal string offset 'month' in form_process_date() (line 2961

Warning: Illegal string offset 'year' in form_process_date() (line 2961

Ive taken out the backtrace on month and year, as they are the same. any thoughts how to get around this problem welcome.

rikibu’s picture

I tried all I can to fix this issue but I cant find a solution to solve this problem.
please help us... thanks alot

peacog’s picture

Status: Active » Closed (duplicate)

Duplicate of http://drupal.org/node/1760532. There is an interim patch for 7.x-4.x there.