Closed (fixed)
Project:
Webform2vTiger
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Jan 2013 at 16:36 UTC
Updated:
30 May 2013 at 12:05 UTC
Using PHP 5.2.17 and Drupal 6.22. After successfully configuring the module, the settings page (admin/settings/webform2vtiger) won't show VTiger required fields and Drupal will throw this message "htmlspecialchars() expects parameter 1 to be string, array given en /var/www/ee_drupal/ww2.entornos.com.ar/includes/bootstrap.inc en la línea 856".
A quick fix could be removing the call to check_plain() on line 77 ($form['field_required']['webform2vtiger_required_fields'] array block). But this might cause some security treat. So what I did was adding a foreach before this block:
/**
* Fix for using check_plain() on 'webfor2tiger_required_fields'.
*/
$webform2vtiger_available_fields = variable_get('webform2vtiger_available_fields', array());
foreach($webform2vtiger_available_fields as $key => $value) {
$webform2vtiger_available_fields[$key] = check_plain($value);
}
And then changing:
check_plain(variable_get('webform2vtiger_available_fields', array()))
To:
$webform2vtiger_available_fields
This might need some further testing.
Comments
Comment #1
Robertas commentedThank you for your submit. This error was fixed in a release version webform2vtiger 6.x-1.0
Please download latest version of the module.
Thank you!
Robertas
Comment #1.0
Robertas commentedAdded Drupal version.