Hello,

On submission of the webform I receive a white screen, or with errors turned on the following error:
Fatal error: Call to undefined function: array_diff_key() in .... .... /sites/all/modules/webform/webform.module on line 2755

array_diff_key is a PHP 5 function, is this module supposed be compatible with older versions of PHP?

If not, perhaps you could add an indicator in the requirement notes or something. Would anyone have any idea how to alter this so that it works for php 4.4.9?

As you might have guessed I am new to Drupal and trying to make some changes to a friend's site, please excuse me if this is the incorrect place to ask for help on this, any help at all is appreciated.

Thanks,
Inge

CommentFileSizeAuthor
#2 webform_php5.patch429 bytesquicksketch

Comments

quicksketch’s picture

Category: bug » task
Priority: Critical » Normal

Hm, seems that we should make Webform 3.x PHP 5 only (just like Drupal 7) considering it's a brand new release and PHP support ended for PHP 4 over a year ago.

If you want to use Webform on your server, use Webform 2. Otherwise you should look into upgrading your server or switching hosts.

quicksketch’s picture

Title: array_diff_key() error on submission and when trying to edit webforms. » Make Webform 3.x require PHP 5
Status: Active » Fixed
StatusFileSize
new429 bytes

Webform 3 has been marked as PHP 5 only in the .info file.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ranto’s picture

quicksketch,

My hosting server is loading PHP 5.0.4 . I am having the same trouble when submitting webform. Could you please tell us how to get rid of this error ?
note the errors are :
"Call to undefined function array_diff_key() in webform.module" and
"Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /var/www/html/includes/database.inc on line 213"

Thanks in advance

epersonae2’s picture

array_diff_key is PHP 5.1.0 or greater.