Title: [Plugin: Cache Images] Errors
Last modified: August 19, 2016

---

# [Plugin: Cache Images] Errors

 *  [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * (@dpaule)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/)
 * Warning: Invalid argument supplied for foreach() in /home/####/#####/######/wp-
   content/plugins/cache-images/cache-images.php on line 516
 * which is:
    foreach ($domains as $domain => $num) :
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/davidrad/public_html/chefs/wp-content/plugins/cache-images/cache-images.
   php:516) in /home/####/#####/######/wp-includes/classes.php on line 1601
 * I tried the obvious which was removing any blank lines at the beginning or end
   of file… though no luck.
 * Thanks for any help you could offer
 * [http://wordpress.org/extend/plugins/cache-images/](http://wordpress.org/extend/plugins/cache-images/)

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

 *  Plugin Author [Milan Dinić](https://wordpress.org/support/users/dimadin/)
 * (@dimadin)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788775)
 * Sorry to hear this. This is something related to either your server, WordPress
   setup, or specific conditions on your site since I just tested latest version
   and it works as intended.
 * Can you please tell me when and where you get this error and have you used plugin
   successfully before (either this or previous version)?
 *  Thread Starter [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * (@dpaule)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788907)
 * When updating old posts. No.
 *  Plugin Author [Milan Dinić](https://wordpress.org/support/users/dimadin/)
 * (@dimadin)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788910)
 * Please try [development version](http://downloads.wordpress.org/plugin/cache-images.zip),
   it tries to prevent displaying of this error though it won’t cache images when
   error is present since I don’t know why it is happening (very little information
   from you).
 *  [Gigaa](https://wordpress.org/support/users/gigaa/)
 * (@gigaa)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788913)
 * Im having this problem too and I´ve tried the plugin in 2 different hosts and
   still the same.
 * Any progress ?
 *  Thread Starter [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * (@dpaule)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788915)
 * dimadin, are willing to make fixes for a fee? Thanks.
 *  Thread Starter [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * (@dpaule)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788916)
 * BTW the development version seems to have fixed the errors issue.
 *  [FriendlyWP](https://wordpress.org/support/users/mmcginnis/)
 * (@mmcginnis)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788920)
 * I’m having this issue too, getting multiple errors:
 * Warning: Invalid argument supplied for foreach() in /home/####/#####/######/wp-
   content/plugins/cache-images/cache-images.php on line 516
 * This occurred when I added pages to a new WP menu in Appearance > Menus and tried
   to save it. When I surfed away, then back to the menus page, the error was gone.
   I am running a multisite installation of WordPress 3.0.2 on HostGator (LAMP setup).
 * I’ll continue running the current (non-dev) version for now and will continue
   watching to see when this happens so I can report back. Thanks!
 *  [FriendlyWP](https://wordpress.org/support/users/mmcginnis/)
 * (@mmcginnis)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788921)
 * I also got the error when I add a new post. The error goes away after I save 
   a draft and doesn’t reappear.
 *  Plugin Author [Milan Dinić](https://wordpress.org/support/users/dimadin/)
 * (@dimadin)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788925)
 * After mmcginnis’ more detailed replies, I’m quite sure that development version
   should fix this issue. I didn’t consider that my hook would run on every saving/
   publishing of post so that I need to check if there are results with check for
   images.
 * Later today I’ll release a new version of a plugin that fixes this issue.

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

The topic ‘[Plugin: Cache Images] Errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cache-images.svg)
 * [Cache Images](https://wordpress.org/plugins/cache-images/)
 * [Support Threads](https://wordpress.org/support/plugin/cache-images/)
 * [Active Topics](https://wordpress.org/support/plugin/cache-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cache-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cache-images/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [Milan Dinić](https://wordpress.org/support/users/dimadin/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cache-images-errors/#post-1788925)
 * Status: not resolved