Hi and thank you for this module,

I'm trying to install this module and I've got this error on the user/register page :

htmlspecialchars() expects parameter 1 to be string, array given in /home/rafik/test/includes/bootstrap.inc on line 631

Besides, the picture is not uploaded during the registration process.

I'm using nf_registration_mod module with pageroute and node profile modules.
Thank you for your help

Rafik

Comments

yhager’s picture

Status: Active » Needs work

This happens since both reg_with_pic.module and nodeprofile.module set the value of $form['#attributes']['enctype'], which results in it being an array and thus the error from htmlspecialchars().

I fixed it by wrapping an if() clause around the setting of this value (line 17 in reg_with_pic.module), like this:

        if (!module_exists('nodeprofile')) {
          $form['#attributes']['enctype'] = 'multipart/form-data';
        }

I am not attaching a patch cause it will not work in all cases.
It works for me ATM, but I leave it to the author of this module to find the right fix for this.

mmilano’s picture

Status: Needs work » Closed (fixed)