warning: htmlspecialchars() expects parameter 1 to be string, array given in [edited]includes/bootstrap.inc on line 857

Devel backtrack leads to role_change_notify_token_values trying to pass on an array (date of birth from user profile), instead of string.

The new role gets saved and the user notified.

CommentFileSizeAuthor
#5 profile_date.patch539 bytesawlo

Comments

rfay’s picture

Thanks for the report!

Was this using profile module or content_profile? If content_profile, could you attach an export of the content type? If profile module, could you please describe the profile?

awlo’s picture

Thanks for the answer!

It's the profile module. The profile is divided into three sections, each has at least one textfield, two have selections, one has a textarea, one has a checkbox and one has a date field.

The one with the date field is made out of textfields, selections, textarea and date.

Anticosti’s picture

I am using the core Profile mod.
For me the error on line 857 dissapeared after uninstalling the Case Tracker Module (casetracker-6.x-1.0-beta8)
Hope this may help...

rfay’s picture

Title: warning: htmlspecialchars() » warning: htmlspecialchars() expects parameter 1 to be string, array given in includes/bootstrap.inc on line 857

Thanks, Anticosti.

awlo’s picture

Status: Active » Needs review
StatusFileSize
new539 bytes

This patch solves it for me. There probably exists a better solution for this.

The patch includes also patch from http://drupal.org/node/731344, since that issue is somewhat related.

Status: Needs review » Needs work

The last submitted patch, profile_date.patch, failed testing.

rfay’s picture

Thanks for your work on this, @awlo. Please see if you can sort out the test failure.

-Randy

teliseo’s picture

Status: Needs work » Needs review

Current 6.x-2.x-dev, with patch from #557458: Different Notification Messages for Each Role, fixes this issue by properly setting tokens for date fields in the user profile. Please review and set status to RTBC.

rfay’s picture

Status: Needs review » Closed (duplicate)

Let's just call this a dup of #557458: Different Notification Messages for Each Role. If you still have this problem when using current 6.x-2.x-dev, please report in that issue.

Thanks everybody!

teliseo’s picture

I’d argue that closed (fixed) is more appropriate, since this issue is completely unrelated to #557458: Different Notification Messages for Each Role (I just happened to have run into this issue independently and, maybe erroneously, added a fix in my patch for that issue), but that would be splitting hairs.