WordPress.org

Ready to get started?Download WordPress

Forums

Media library " Warning on line 264 ???" (7 posts)

  1. dreydesign
    Member
    Posted 6 years ago #

    Warning: Invalid argument supplied for foreach() in /blog/wp-includes/media.php on line 264

    This appears if i go in the Media library tab, it is shown above each thumbnail.
    What does it mean? it never did it before!
    I already tried reinstalling wordpress, the problem persists...

  2. chrowe
    Member
    Posted 6 years ago #

    I have the same problem. It happened after moving a development directory to the live directory, I think. But I have never looked in the Media library before.

  3. asv2001
    Member
    Posted 6 years ago #

    Same problems. I have made a quick fix. May be this can be useful:
    1. Open file wp-includes/media.php
    2. Find go to line 264:
    // get the best one for a specified set of dimensions
    $imagedata = @unserialize($imagedata); //this is a quick fix

  4. lilqhgal
    Member
    Posted 6 years ago #

    I have this same problem. Do I add the fix or do I replace something with it? Mine just showed up - didn't move anything or change anything, so I don't know what is going on.

  5. stevepage
    Member
    Posted 6 years ago #

    Same error on my site, has anyone fixed this properly?

  6. Zach Waldowski
    Member
    Posted 6 years ago #

    It has not been fixed properly. The bug is marked as a to-fix for 2.5.2.

    What cause this error is a screw-up in the way WordPress occasionally stores image sizes. The frontend gets along fine without it, but this warning is given only in the media library. 2.5.2 will include an upgrade fix that parses your image database and fixes this corruption.

    Your current solution is to wait for 2.5.2. Sorry, it's either that or mucking around in media.php in a way that will even further screw up the media library.

  7. yong1986
    Member
    Posted 5 years ago #

    Now 2.6 is released, I upgraded to 2.6 but the problem still present, all my images are displayed in full size instead of thumbnails, this happen after I shifted the files and database to a new host and domain, the path to the upload folder is correct, and interestingly, the new images I upload can display properly as thumbnails in the post.

Topic Closed

This topic has been closed to new replies.

About this Topic