Title: implode() [function.implode]: Invalid arguments passed in
Last modified: August 24, 2016

---

# implode() [function.implode]: Invalid arguments passed in

 *  Resolved [Ulla1973](https://wordpress.org/support/users/ulla1973/)
 * (@ulla1973)
 * [11 years ago](https://wordpress.org/support/topic/implode-functionimplode-invalid-arguments-passed-in/)
 * I’m not quite sure what’s the problem.. I’ve used the Optimizer on several sites,
   but on this last one I got on top of the page:
    Warning: implode() [function.
   implode]: Invalid arguments passed in /home/monadrzg/public_html/wp-content/themes/
   optimizer/lib/functions/core.php on line 25 From core-functions.php:
 * 19. function optimizer_first_image() {
    20. if(is_404()){ 21. return; 22. } 23.
   global $wp_query; 24. if( $wp_query->post_count <1){ 25. return; 26. } 27. global
   $post, $posts; 28. $image_url = ”; 29. ob_start(); 30. ob_end_clean(); if(preg_match_all(‘/
   <img.+src=[\'”]([^\'”]+)[\'”].*>/i’, $post->post_content, $matches)){; $image_url
   = $matches [1] [0]; } return $image_url; }`
 * Sadly I didn’t take the .php course :/
    And I don’t understand what’s wrong with
   line 25? Are there anyone who can give me a tips?
 * The webpage is: [http://monaduaas.no](http://monaduaas.no)
 * Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years ago](https://wordpress.org/support/topic/implode-functionimplode-invalid-arguments-passed-in/#post-5982873)
 * I recommend asking at [https://wordpress.org/support/theme/optimizer#postform](https://wordpress.org/support/theme/optimizer#postform)
   so the theme’s developers and support community can help you with this.
 *  Thread Starter [Ulla1973](https://wordpress.org/support/users/ulla1973/)
 * (@ulla1973)
 * [11 years ago](https://wordpress.org/support/topic/implode-functionimplode-invalid-arguments-passed-in/#post-5982904)
 * Thank you.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [11 years ago](https://wordpress.org/support/topic/implode-functionimplode-invalid-arguments-passed-in/#post-5982905)
 * You’re welcome!
 * [https://wordpress.org/support/topic/implode-functionimplode-invalid-arguments-passed-in-1](https://wordpress.org/support/topic/implode-functionimplode-invalid-arguments-passed-in-1)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘implode() [function.implode]: Invalid arguments passed in’ is closed 
to new replies.

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [invalid arguments](https://wordpress.org/support/topic-tag/invalid-arguments/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/implode-functionimplode-invalid-arguments-passed-in/#post-5982905)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
