WordPress.org

Ready to get started?Download WordPress

Forums

EWWW Image Optimizer
[resolved] Something wrong. Invalid argument and cannot modify header (8 posts)

  1. flamenko
    Member
    Posted 1 year ago #

    Can someone help me with this? This is what is happening when I try to compress an image.

    Warning: Invalid argument supplied for foreach() in /home/XXXXX/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 1096

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXXX/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php:1096) in /home/thessd5/public_html/wp-includes/pluggable.php on line 881

    http://wordpress.org/extend/plugins/ewww-image-optimizer/

  2. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    Just to be clear, you clicked the 'optimize' link next to an image, and go this error, right? Based on the error you're getting, my best guess is that you double-clicked the optimize link, causing it to try and resend the headers, and also resulting in some invalid data being thrown around from concurrent optimizations. Try it again, and make sure you are only single-clicking.
    If you still have trouble, post the contents of your debug block (settings page), what kind of image you are trying to process (PNG, JPG, GIF), the filesize, and which settings you have relevant to that image type.

  3. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    someone else is having a similar error, I've reproduced it on my 2nd test server (but not the primary oddly), so I'll see what I can find out.

  4. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    turns out, it's not really an 'error', but a variable I forgot to initialize. Unfortunately, it trickles down and breaks the output that is supposed to show up when you upload an image. I'll have 1.2.2 out today.

  5. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    should have mentioned that you can also get rid of this error by turning off WP_DEBUG in your wp-config.php
    i'm working on one more quirk for 1.2.2 but hopefully I'll still get it out the door today.

  6. Jan Hemmingsen
    Member
    Posted 1 year ago #

    Any news on when an update will be out?

    Unfortunately it also prevents regenerating thumbnails :-/

    Regenerate Thumbnails
    All done! 0 image(s) were successfully resized in 5 seconds and there were 1 failure(s). To try regenerating the failed images again, click here. To go back to the previous page, click here.

    Please be patient while the thumbnails are regenerated. This can take a while if your server is slow (inexpensive hosting) or if you have many images. Do not navigate away from this page until this script is done or the thumbnails will not be resized. You will be notified via this page when the regenerating is completed.

    100%
    Debugging Information

    Total Images: 1
    Images Resized: 0
    Resize Failures: 1

    function (){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}

    Thanks for your great work!

    Cheers

    Jan

  7. Jan Hemmingsen
    Member
    Posted 1 year ago #

    Forgot to say that WP Debug already is off, which doesn't prevent the Invalid Argument statement.

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */
    define('WP_DEBUG', false);

  8. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    odd, I didn't ever see the warnings until I turned ON debug mode (which I should have had on while I was testing...)

    Anyway, I ran out of time to do testing, so I'll be wrapping that up today and releasing it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.