Im getting a random warning on different pages, Started when i updated to version 6.x -1.5 and still happens in the dev version.
Here is the backtrace of the warning

warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/biz/public_html/diablo3plaza.com/includes/database.mysql.inc on line 321.

Array
(
    [0] => Array
        (
            [file] => /home/biz/public_html/diablo3plaza.com/includes/common.inc
            [line] => 646
            [function] => drupal_set_message
            [args] => Array
                (
                    [0] => warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/biz/public_html/diablo3plaza.com/includes/database.mysql.inc on line 321.
                    [1] => error
                )

        )

    [1] => Array
        (
            [function] => drupal_error_handler
            [args] => Array
                (
                    [0] => 2
                    [1] => mysql_real_escape_string() expects parameter 1 to be string, array given
                    [2] => /home/biz/public_html/diablo3plaza.com/includes/database.mysql.inc
                    [3] => 321
                    [4] => Array
                        (
                            [text] => Array
                                (
                                    [0] => -1
                                )

                            [active_db] => Resource id #7
                        )

                )

        )

    [2] => Array
        (
            [file] => /home/biz/public_html/diablo3plaza.com/includes/database.mysql.inc
            [line] => 321
            [function] => mysql_real_escape_string
            [args] => Array
                (
                    [0] => Array
                        (
                            [0] => -1
                        )

                    [1] => Resource id #7
                )

        )

    [3] => Array
        (
            [file] => /home/biz/public_html/diablo3plaza.com/includes/database.inc
            [line] => 225
            [function] => db_escape_string
            [args] => Array
                (
                    [0] => Array
                        (
                            [0] => -1
                        )

                )

        )

    [4] => Array
        (
            [function] => _db_query_callback
            [args] => Array
                (
                    [0] => Array
                        (
                            [0] => %s
                            [1] => %s
                        )

                )

        )

    [5] => Array
        (
            [file] => /home/biz/public_html/diablo3plaza.com/includes/database.mysql-common.inc
            [line] => 41
            [function] => preg_replace_callback
            [args] => Array
                (
                    [0] => /(%d|%s|%%|%f|%b|%n)/
                    [1] => _db_query_callback
                    [2] => SELECT * FROM nodewords WHERE type = '%s' AND id = '%s'
                )

        )

    [6] => Array
        (
            [file] => /home/biz/public_html/diablo3plaza.com/modules/nodewords/nodewords.module
            [line] => 847
            [function] => db_query
            [args] => Array
                (
                    [0] => SELECT * FROM {nodewords} WHERE type = '%s' AND id = '%s'
                    [1] => tracker
                    [2] => Array
                        (
                            [0] => -1
                        )

                )

        )

    [7] => Array
        (
            [file] => /home/biz/public_html/diablo3plaza.com/modules/nodewords/nodewords.module
            [line] => 788
            [function] => nodewords_load_tags
            [args] => Array
                (
                    [0] => tracker
                    [1] => Array
                        (
                            [0] => -1
                        )

                )

        )

    [8] => Array
        (
            [file] => /home/biz/public_html/diablo3plaza.com/modules/nodewords/nodewords.module
            [line] => 454
            [function] => nodewords_get_tags
            [args] => Array
                (
                    [0] => tracker
                    [1] => Array
                        (
                            [0] => Array
                                (
                                    [0] => -1
                                )

                        )

                )

        )

    [9] => Array
        (
            [function] => nodewords_preprocess_page
            [args] => Array
                (
                    [0] => Array
                        (
                            [template_files] => Array
                                (
                                    [0] => page-tracker
                                )

                            [content] => 

Comments

avpaderno’s picture

Title: Random warning » Wrong parameter passed to mysql_real_escape_string()
Version: » 6.x-1.5
avpaderno’s picture

I have marked #650848: mysqli_real_escape_string() error? as duplicate of this report.

avpaderno’s picture

Status: Active » Postponed (maintainer needs more info)

What were you doing, when you obtained that error message?

volf’s picture

Error appears randomly when loading a page, happens more often on some pages like the tracker but has happened in forum posts, nodes, on main page etc

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Active

I will check again, but I don't get any errors with the latest development snapshot. I will also verify I am not missing any error messages.

Thanks for your answer.

avpaderno’s picture

I am testing the development snapshot of the module on a test server with installed the development snapshot of Drupal 6 (that means also the notice messages are shown on the screen); so far, I am not getting that error.

volf’s picture

Updating to 6.x-1.7 appears to have fixed the problem

avpaderno’s picture

Version: 6.x-1.5 » 6.x-1.x-dev
Status: Active » Fixed

As per previous comment, I am marking this report as fixed.

sniegs’s picture

Yes, I was having the same issue and with the 1.7 update it's gone.

Status: Fixed » Closed (fixed)

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