warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/vhosts/mastview/includes/database
daouverson2 - June 10, 2008 - 13:00
| Project: | Link |
| Version: | 6.x-2.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/vhosts/mastview/includes/database.mysqli.inc on line 323.

#1
upon page or story node submission.
#2
it just started happening. doesn't happen when adding an image via image module.
#3
Unable to reproduce.
#4
This is pretty major to me, and I'm happy to answer any questions. I'm getting this error every time I/or a user adds a page or story.
#5
additional information:
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/vhosts/mastview/includes/database.mysqli.inc on line 323.
#6
daouverson2 I tried to reproduce your bug and i was not able to. Can you please write down a detailed description on how to reproduce your bug sothat others can better understand what is happening?
You can do this by setting up a second drupal installation and trying to reproduce the bug inside that one - to give you an idea.
Which optional modules are you using and if you do so, have you tried to switch them off?
#7
I think I may have a hint, that is leading to the culprit being the "link" module (additional module to augment CCK). Here's why:
I can add a page or story node w/o adding a link (a filed that was added to page and story) and I don't get error; when I add a link, I get the error. I just updated the link module; I wasn't getting the error prior to upgrading.
Here's the modules I have enabled (pretty basic/standard?)
Drupal 6.2
Includes: Aggregator, Block, Bluemarine, Book, Color, Comment, Contact, Content translation, Database logging, Filter, Garland, Help, Locale, Menu, Node, PHP filter, Path, Ping, Poll, Profile, Search, Statistics, Syslog, System, Taxonomy, Throttle, Tracker, Trigger, Update status, Upload, User
Modules:
CAPTCHA 6.x-1.0-rc2
Includes: CAPTCHA
Content Construction Kit (CCK) 6.x-2.0-beta
Includes: Content
Image 6.x-1.0-alpha1
Includes: Image, Image Attach
Link 6.x-2.2
Includes: Link
LoginToboggan 6.x-1.2
Includes: LoginToboggan
Pathauto 6.x-1.0
Includes: Pathauto
Poormanscron 6.x-1.0
Includes: Poormanscron
Terms of Use 6.x-1.7
Includes: Terms of Use
Token 6.x-1.10
Includes: Token, Token actions
Views 6.x-2.0-beta3
Includes: Views, Views UI
#8
So have you tried to make an additional drupal setup using the listed modules and trying to reproduce? you filed a bug-report so steps to reproduce should be given.
#9
I'm 80% that it is the 2.2 version of the link module.
#10
and is the error gone when you switch it off?
#11
yes
#12
#13
CCK changed it's hook name from "process form values" to "presave", so the API changed out from under link. This patch will correct the problem and should be included in the 2.3 version later today.
#14
#15
Automatically closed -- issue fixed for two weeks with no activity.
#16
Hi, this issue seems to fixed but i got the same warning as the opening issue above
to date 11/09/08
is it come back somehow -i guess- with the CCK rc7?
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/site/includes/database.mysqli.inc on line 323.Content Construction Kit (CCK) 6.x-2.0-rc7
links 6.x-2.2
Views 6.x-dev
also i have tried the 'fixed patched' links 6.x-dev gives the same result