WordPress.org

Ready to get started?Download WordPress

Forums

EWWW Image Optimizer
[resolved] Warning: Invalid argument supplied for foreach() (10 posts)

  1. silico
    Member
    Posted 1 year ago #

    Hello!
    I have 1180 photos in FlAGallery folder. All files in FlAGallery are JPG images (edited with Photoshop CS5)
    EWWW optimizer starts clear and clean but after ca. 70 seconds stops. After continuations start:
    Warning: Invalid argument supplied for foreach() in /homepages/.../wp-content/plugins/ewww-image-optimizer/flag-integration.php on line 173

    That's part of this code:

    foreach ($images as $id) {
    			set_time_limit (50);
    			$current++;
    			if (isset($last_attachment)) {
    			if ($last_attachment == $id) {$skip_attachments = false;}
    			}

    I know myself a little but maybe it's not a big problem and I can repair itself (?)

    Thanks very much for your help; this is very useful plugin.
    Jacek

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

  2. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    Just to be clear here, you start the bulk optimizer, and it stops due to a timeout, or who knows what else. You then go into resume it, and it throws the error?

  3. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, yes I see the error now, I'll have to try and track down what I did wrong.

  4. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    1.3.5 will be out later today to fix the issue.

  5. silico
    Member
    Posted 1 year ago #

    Super! Thank you very much.

    I have now made ​​4 attempts with two computers with Firefox and Chrome:

    1) Stops at:
    Processing 289/1179: 595_jpg.jpg ...

    Full size - No Savings
    Thumbnail - No Savings
    Elapsed: 92 seconds

    Processing 294/1179: 609_jpg.jpg ...
    Full size - No Savings

    Once more (Bulk Optimize):

    It appears that a previous bulk optimization was interrupted.
    Would you like to continue where we left off?

    Yes - click and almost immediately:

    Warning: Invalid argument supplied for foreach () ... ... ... on line 173

    2) Processing stops at 278/1179, Elapsed: 84 seconds
    3) Stops processing at 294/1179, Elapsed: 87 seconds
    4) Processing stops at 280/1179, Elapsed: 94 seconds

    Once more thank you.
    Happy New Year :)

    Jacek

  6. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    I bumped 1.3.5 out the door a couple hours ago, it should fix it.

  7. silico
    Member
    Posted 1 year ago #

    After three resumes all 1179 images are optimized.
    Thank you very much. Last photo:

    Processing 1179/1179: 130.jpg…
    Full size – Reduced by 0.5% (131 B)
    Thumbnail – Reduced by 9.4% (3.7 KB)
    Elapsed: 68 seconds

    Finished Optimization

  8. SeanRNicholson
    Member
    Posted 1 year ago #

    I'm seeing this same issue on 1.3.7. Was the fix included in that version?

    Warning: Invalid argument supplied for foreach() in /home/.../ewww-image-optimizer/bulk.php on line 52

    --Sean

  9. nosilver4u
    Member
    Plugin Author

    Posted 1 year ago #

    Sean,
    It was specifically a bug in the 'resume' feature of nextgen and flagallery, but perhaps it was in the main bulk optimizer and I missed it. I'll have to take a look. If you could start a new thread, as you apparently are seeing a new issue, and please post the exact steps to reproduce the error (so I'm not beating my head against a wall trying to guess what you did).

  10. SeanRNicholson
    Member
    Posted 1 year ago #

    Sure, I can start a new thread...but the process I was following is exactly what this author was doing.

    1) Start the bulk optimize process
    2) After about 70 seconds, the process stops
    3) I click the resume button
    4) The error below presents itself

    Warning: Invalid argument supplied for foreach() in /home/.../ewww-image-optimizer/bulk.php on line 52

    Figured I would add it here since it's the same issue the original poster saw.

    --Sean

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic