Seeing this error: Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in db_escape_string() (line 410 of /includes/database.mysqli.inc). I did see this issue http://drupal.org/node/268891 and implemented the patch but still saw this error. What's happening is that if a url is empty and it's not required, _link_process() is serializing attributes that don't exist, then appending it to the link item. Patch will be uploaded in the comment below. I tested the patch locally and it gets rid of the message.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | empty-link-1580370-1.patch | 1.33 KB | djbobbydrake |
Comments
Comment #1
djbobbydrake commentedPatch attached. What I've done is move up the bit that unsets the url, which will happen for blank urls and invalid ones. Then I add a return if the url has been unset, because then there's no reason to add attributes to the link, which was causing the issue.
Comment #2
danielapsmaior commentedI'm getting this error in 6.x-2.11 version with drupal 6.31.
I have tried this patch in #1 and still didn't work.
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/drupal-6.31/includes/database.mysqli.inc on line 329.
Comment #3
damienmckennaThank you all for your efforts, but I'm sorry to say that the D6 version is no longer supported.