stilltoni Posted April 27, 2012 Share Posted April 27, 2012 I get this error on my homepage : Warning: implode() [function.implode]: Invalid arguments passed in /home/shqip1/peqini.com/wp-content/themes/sportpress/functions/wpzoom-widgets.php on line 1469 This is the code to modify http://pastebin.com/RiBsyG3c Thanks Quote Link to comment Share on other sites More sharing options...
Zephni Posted April 27, 2012 Share Posted April 27, 2012 Your code: $postsq = implode(",",$category); Looks like you have passed too many parameters. The function returns a string with glued array items like: array("bob","gary") would return "bob-gary" if you used implode("-", array("bob","gary")) Try this documentation: http://php.net/manual/en/function.implode.php Quote Link to comment Share on other sites More sharing options...
noXstyle Posted April 27, 2012 Share Posted April 27, 2012 $postsq = implode(",",$category); Looks like you have passed too many parameters. The function returns a string with glued array items like: array("bob","gary") would return "bob-gary" if you used implode("-", array("bob","gary")) What do you mean by 'passed too many parameters' ? He is passing a comma as the glue and $category as the array. Unfortunately the $cateagory is not an array at this instance. You probably want to check that the $category actually holds an array: elseif ($type == 'cat') { if(isset($category) && is_array($category)) $postsq = implode(",",$category); } And if this breaks functionality, you should debug the code and see where the $category actually comes from and why it is not an array. Quote Link to comment Share on other sites More sharing options...
Zephni Posted April 27, 2012 Share Posted April 27, 2012 Omg I looked at it wrong and its far too embaressing to explain why I thought that... Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 27, 2012 Share Posted April 27, 2012 Omg I looked at it wrong and its far too embaressing to explain why I thought that... It's quite obvious, you saw " and thought it was two '. It's not really embarrassing. noXstyle is correct on the problem. Quote Link to comment Share on other sites More sharing options...
stilltoni Posted April 27, 2012 Author Share Posted April 27, 2012 Thank you noXstyle. now is ok Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.