How to fix preprocess function error in Nucleus?

+1
-7
-1

bug : Fatal error: [] operator not supported for strings in /opt/lampp/htdocs/public/**/all/themes/nucleus/nucleus/inc/preprocess_functions.inc on line 329

line : $vars['attributes']['id'][] = @$element['#id'];

case: when i installed "webform" module i found this problem when i created "select" field type

solution :
remove

$vars['attributes']['id'][] = @$element['#id'];

and replace it with

if(!empty($vars['attributes']['id'])){
$old_id = $vars['attributes']['id'] ;
$vars['attributes']['id'] = array() ;
$vars['attributes']['id'][] = $old_id ;
$vars['attributes']['id'][] = @$element['#id'];
}

thanks .

No answers yet

Comments

RE: Fatal error: [] operator not supported for strings in /opt/l

Hi Bazo0oka,

Thanks you for the problem notification and your solution. I'll check and improve it soon.

Best Regards,
HaiNN