SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting Error in WP

    One of my friend getting the following error in Wordpress blog at trendztime.com:

    Warning: implode() [function.implode]: Invalid arguments passed in /home/urcric/public_html/trendztime.com/wp-content/themes/ZPRESS/functions/wpzoom-widgets.php on line 1450

    Here are some lines from code:

    if ($type == 'tag')
    {
    $postsq = $slugs;
    }
    elseif ($type == 'cat')
    {
    $postsq = implode(",",$category); <---- Line 1450
    }


    /* Before widget (defined by themes). */
    //echo $before_widget;
    ?>


    Here is a screen shot of error:
    Trendztime error.JPG

  2. #2
    SitePoint Member battambang_kid's Avatar
    Join Date
    Feb 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you have to make sure $category is an array.

    you can initiate
    PHP Code:
    $category = array(); 
    at the top of the script to make sure it's default as an array.

  3. #3
    Non-Member
    Join Date
    Nov 2010
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please be sure that $category is an array. You can check this by
    gettype() php function.


Bookmarks

Posting Permissions

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