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

daouverson2 - June 10, 2008 - 13:01

upon page or story node submission.

#2

daouverson2 - June 10, 2008 - 13:47

it just started happening. doesn't happen when adding an image via image module.

#3

mot - June 10, 2008 - 13:53
Assigned to:Anonymous» mot
Status:active» closed

Unable to reproduce.

#4

daouverson2 - June 10, 2008 - 17:28
Status:closed» active

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

daouverson2 - June 10, 2008 - 18:10

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

mot - June 10, 2008 - 19:21

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

daouverson2 - June 10, 2008 - 20:33

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

mot - June 13, 2008 - 18:12

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

daouverson2 - June 13, 2008 - 18:41

I'm 80% that it is the 2.2 version of the link module.

#10

mot - June 13, 2008 - 22:00

and is the error gone when you switch it off?

#11

daouverson2 - June 18, 2008 - 19:26

yes

#12

spatz4000 - June 19, 2008 - 13:09
Project:Drupal» Link
Version:6.2» 6.x-2.2
Component:database system» Code

#13

quicksketch - June 29, 2008 - 21:21
Assigned to:mot» Anonymous
Status:active» patch (code needs review)

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.

AttachmentSize
link_presave.patch610 bytes

#14

quicksketch - June 29, 2008 - 22:10
Status:patch (code needs review)» fixed

#15

Anonymous (not verified) - July 13, 2008 - 22:14
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#16

ica - September 11, 2008 - 03:55

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

 
 

Drupal is a registered trademark of Dries Buytaert.