Getting Error in WP

One of my friend getting the following error in Wordpress blog at

Warning: implode() [function.implode]: Invalid arguments passed in /home/urcric/public_html/ 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:

you have to make sure $category is an array.

you can initiate

$category = array();

at the top of the script to make sure it’s default as an array.

Please be sure that $category is an array. You can check this by
gettype() php function.