Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem calling bb_insert_topic.

  • @yutt

    Member

    I’m running into an odd error:

    Warning: mysql_real_escape_string(): 16 is not a valid MySQL-Link resource in /forums/bb-includes/backpress/class.bpdb.php on line 394

    This happens when I using an external function I made to create threads which uses bb_insert_topic. It seems to only happen ever other thread created. If I just create one thread, it never happens, if I create three threads in a row, it will happen on the second but not the first or third.

    My function is fairly straight-forward:

    $topic_id = bb_insert_topic(array('topic_title' => $topic_title,'topic_poster' => 5,'forum_id' => 1));

    Is this a bbpress bug?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @yutt

    Member

    Additionally, the error referenced is from the following function, at the first return line:

    function _real_escape( $string )
    {
    if ( $this->dbh && $this->real_escape ) {
    return mysql_real_escape_string( $string, $this->dbh );
    } else {
    return addslashes( $string );
    }
    }

    @yutt

    Member

    Still having this problem. It is happening every even topic created when creating a bunch of topics in a row.

    I’m trying to trace back to what specifically calls _real_escape and why the dbh would suddenly be an invalid resource to that function.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar