Forums

[resolved] Error message "function implode" (4 posts)

  1. khairun
    Member
    Posted 3 years ago #

    After upgrading my word press website to 2.7 the following message appear & my website cannot be seen

    Warning: implode() [function.implode]: Invalid arguments passed in /home/khairun/public_html/dknphoto/wp-includes/query.php on line 1805

    Warning: Cannot modify header information - headers already sent by (output started at /home/khairun/public_html/dknphoto/wp-includes/query.php:1805) in /home/khairun/public_html/dknphoto/wp-includes/pluggable.php on line 850

    How to correct this?

    Khairun

  2. MichaelH
    Volunteer
    Posted 3 years ago #

  3. khairun
    Member
    Posted 3 years ago #

    I have solved the problem.

    I simply copy & paste the file query.php from wp ver 2.65 into the file query.php wp ver 2.7

    Thank you.

  4. kswedberg
    Member
    Posted 3 years ago #

    I had the same problem after upgrading to 2.7.1. The implode function expects an array (because it "joins" the array into a string), but for some reason the value being passed into it is numeric. It meant have something to do with the contentboxes plugin for me. Anyway, it's easy to hack a fix for this in version 2.7's query.php, which, though still not ideal, is better (IMO) than replacing the whole file with an earlier version.

    Replace this (line 1805):

    $cat_string = "'" . implode("', '", $q['category__not_in']) . "'";

    With this:

    $cat_not_in = is_numeric($q['category__not_in']) ? array($q['category__not_in']) : $q['category__not_in'];
    $cat_string = "'" . implode("', '", $cat_not_in) . "'";

    Hope that helps.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags