Results 1 to 4 of 4
  1. #1
    Join Date
    May 2016
    Location
    St. John's NL Canada
    Posts
    28
    Plugin Contributions
    0

    Default mysqli_real_escape_string() expects parameter 2 to be string, array given

    Here is the complete "myDEBUG" message of which there are a "bunch" in the log directory:

    Code:
    [02-Jun-2016 00:59:28 GMT] PHP Warning:  mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/content/53/6837553/html/www/ebb/includes/classes/db/mysql/query_factory.php on line 115
    I have no idea what is provoking this error (I haven't seen it on my test site that I have upgraded to 1.5.5a and am testing/debugging). If I do, I'll reply to this thread with additional information.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: mysqli_real_escape_string() expects parameter 2 to be string, array given

    In simplest terms the error means: when a query was sent to mysql it was found to have incorrect parameters.

    Zen Cart only sends query parameters based on what your code is telling it to do.

    I'm guessing one of your plugins or customizations is sending query data that's an array and has not been squashed down to a string. How to find it? Compare all your files against original files to identify all the places in which your code differs from ZC original code: http://www.zen-cart.com/wiki/index.p...Obscure_Issues

    Additionally for your v154 site you might try installing lat9's debug backtrace plugin to help get more detailed error messages about which specific SQL query is triggering the problem, to help you isolate the issue more quickly.



    (Moderator note: I moved this thread out of the Bug Reports section because it's not a bug in Zen Cart core code.)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,884
    Plugin Contributions
    96

    Default Re: mysqli_real_escape_string() expects parameter 2 to be string, array given

    If you install the "myDEBUG Backtrace" plugon, you'll see what module made that errant call; it's in the core for Zen Cart 1.5.5 and later.

  4. #4
    Join Date
    May 2016
    Location
    St. John's NL Canada
    Posts
    28
    Plugin Contributions
    0

    Default Re: mysqli_real_escape_string() expects parameter 2 to be string, array given

    The problem is being caused in the SuperTracker plugin. I have applied a fix described in the Forum thread devoted to SuperTracker, but will need to monitor the live site to see if the problem is truly resolved.

    The thread is: https://www.zen-cart.com/showthread....62#post1202262 and the immediately following post.

 

 

Similar Threads

  1. Warning: trim() expects parameter 1 to be string, array given
    By jpietrowiak in forum General Questions
    Replies: 2
    Last Post: 8 Jun 2013, 07:06 PM
  2. v139e PHP Warning: strlen() expects parameter 1 to be string, array given in
    By irishshopper in forum Basic Configuration
    Replies: 4
    Last Post: 7 Mar 2013, 08:06 PM
  3. v139h PHP Warning: strip_tags() expects parameter 1 to be string, array given
    By BlessIsaacola in forum General Questions
    Replies: 1
    Last Post: 6 Mar 2012, 01:32 PM
  4. v150 PHP Warning: strlen() expects parameter 1 to be string, array given
    By caffeitalia in forum General Questions
    Replies: 1
    Last Post: 1 Feb 2012, 03:17 PM
  5. Replies: 13
    Last Post: 5 May 2011, 03:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg