• Hi there

    WP-Version: 2.8.1
    PHP 5.2.9
    mySQL: 5.0.8.3
    Hoster: all-inkl.com

    After my update to WP 2.8.1 (german version) I get the following error when editing PAGES above the FCK-Editor box:

    Warning: implode() [function.implode]: Invalid arguments passed in /www/htdocs/my-webseite.xyz/wp-includes/post.php on line 1762

    When I want to save this page, I’ll get this error:

    Warning: implode() [function.implode]: Invalid arguments passed in /www/htdocs/my-webseite.xyz/wp-includes/post.php on line 1762

    Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/my-webseite.xyz/wp-includes/post.php:1762) in /www/htdocs/my-webseite.xyz/wp-includes/pluggable.php on line 865

    What I tried to solve the problem:
    – Deacticate EVERY/ALL plugins
    -> the error is still there

    – changing to the lastest default theme
    -> the error is still there

    – delete every cache, deaktivate every cache-plugins
    -> the error is still there

    What can I do???

    Greatings, Tobias

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter TobiasHeuken

    (@tobiasheuken)

    Seems like the problem is in $wpdb->escape(), which in 2.8.1 does nothing but addslashes() to the string passed to it.

    On line 1762, though, $hierarchical_post_types is an array… so it’s trying to addslashes() on an array, which is crapping out, which causes the implode to crap out, which results in the error.

    Thread Starter TobiasHeuken

    (@tobiasheuken)

    hmmmmm ?????

    By the way – WHAT can I do solve this problem?

    Sorry, I installed over 10 blogs which are basing on static sides – and I want to change some sides …

    Greatings, Tobias

    A temporary fix would be to open /wp-includes/post.php, navigate to line 1762, and remove the $wpdb->escape() function from the statement.

    change this:

    $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( '" . implode("', '", $wpdb->escape($hierarchical_post_types)) . "' ) AND ID != %d AND post_parent = %d LIMIT 1";

    to this:

    $hierarchical_post_types_string = implode("', '", $hierarchical_post_types);
    $hierarchical_post_types_string = addslashes($hierarchical_post_types_string);
    $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( '" . $hierarchical_post_types_string . "' ) AND ID != %d AND post_parent = %d LIMIT 1";

    I found your post looking for the same issue but couldn’t find anything so I made the above changes to fix it.

    Thread Starter TobiasHeuken

    (@tobiasheuken)

    Hey buddy …

    THANKS … yes, this works!

    Ok … I hope the WP-programmers still read this article and they will fix this problem with WP 2.8.2

    Greatings, Tobias

    Thanks Zimmor,
    your trick worked perfectly. I also, when i moved to
    WP2.8.4 could not edit Pages anymore because of the error

    “Warning: implode() [function.implode]: Bad arguments. in /mnt/104/sdb/8/1/pfcs/wp-includes/post.php on line 1762”

    I edited the line in POST.PHP and now it works fine.

    I am on a website hosted by the provider free.fr

    getting this error in 2.8.4 with or without plugins activated. ?? can’t find a fix anywhere ??

    ravetildon

    (@ravetildon)

    I am also getting this error.

    I believe it happened when a person tried to publish a post, but the post didn’t publish due to heavy server load.

    They then hit reload to this page multiple times:

    https://www.example.com/wp-admin/post.php

    After that the blog is unable to post new articles or pages.

    Also all the “pages” (not “posts”) had the post slug (the one they tried to publish when server was under load) inserted into every page slug.

    Any help to you? Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error: /wp-includes/post.php on line 1762’ is closed to new replies.