This is the warning on Test
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in .../includes/database.mysqli.inc on line 323.
It retrieves some data but surely not all arrays. Latest beta5 version. In the node I bypass the error with making it hidden in the display field as suggested but the test shows the error anyhow and not everything is retrieved. Ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Modules-dev.arcticreviews.co_.uk_1256651246697.png | 347.16 KB | michaelfoggin |
| #4 | Amazon API - 1.png | 44.78 KB | michaelfoggin |
| #4 | Amazon API - 2.png | 50.28 KB | michaelfoggin |
| #4 | Amazon API - 3.png | 50.13 KB | michaelfoggin |
Comments
Comment #1
charos commentedwarning: mysqli_real_escape_string() expects parameter 2 to be string, array given in .../includes/database.mysqli.inc on line 323. This happens with e.g. this ASIN: B000A2GYEO
But with this ASIN: 0805444777 no error is shown. Ideas?
Comment #2
FrontBurner commentedsubscribing
Comment #3
michaelfoggin commentedlikewise subscribing...
using example ASIN as in #1 I get the following returned
Comment #4
michaelfoggin commentedI think I've narrowed this problem down to music CD's.
If I test against books, laptops, power drills, games, or even MP3 downloads all is fine.
Everytime I test against a CD I get a couple of errors (see attached). These show up twice per node everytime I run CRON which isn't good considering the site is a music review site!
I'm comparing the arrays returned from different product types but I can't debug code so not sure what's causing the problem. Hopefully this message will prove useful to someone else in fixing the issue.
Cheers :)
Comment #5
rfayI am unable to recreate this in the current version (tonight's dev release). I tested by using this ASIN in an ASIN cck field, and also on the admin test page. Please re-check.
Thanks,
-Randy
Comment #6
michaelfoggin commentedHmm...
I still get it. I'm attaching a screendump so you can see what other modules I have installed / enabled / configured.
If you spot something I should add / delete / enable / disable I'd be happy to oblige.
Cheers :)
Mik
Comment #7
rfayI haven't had anybody tell me how to recreate this, so can't really pursue it. If you use the scenario I outlined in #5, do you get this error? When? How?
The way to resolve this, if you can demonstrate it on a test/dev install, is to add something like this to the line right before the offending line, includes/database.mysql.inc, line 323:
Please try that, and I think it will tell us all.
Comment #8
rfayI read this more carefully and now am able to recreate the issue, so will get it fixed. I hadn't understood that this only happens on the test page (admin/settings/amazon/test).
Comment #9
michaelfoggin commentedI updated includes/database.mysqli.inc rather than includes/database.mysqli.inc and get the following.
Hope this assists :)
Comment #10
michaelfoggin commentedBeing dim: having problems replying for some reason...
Comment #11
rfayComment #12
rfayThe "artist" in the amazon data is often an array, but it was being saved where the database expects a string. I added code to catch that.
This will be in today's dev version and will show up in 6.x-1.0-rc2.
Comment #13
antlib commentedHi there
Any advance on a update on this as I'm getting exactly the same issue on installing this module and running a test:
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/adamand/public_html/includes/database.mysqli.inc on line 323
Thanks!
Stan
Comment #14
rfay@antlib: Have you tried the dev version? If not, please do, and report on your status. I believe this is fixed.
Comment #15
antlib commentedOooh no - would you mind pointing me in the right direction?
Thanks for the very quick response!
Stan
Comment #16
antlib commentedDoh found the dev link!
Thanks again!
Comment #17
antlib commentedInstalled the dev version and works like a charm - thanks again!
Any news on when to look out for an updated release candidate?
Regards,
Stan
Comment #18
rfayI'll do an RC before long - next time I work on it.