Support » Fixing WordPress » Media library ” Warning on line 264 ???”

  • 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…

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    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

    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.

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

    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.

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Media library ” Warning on line 264 ???”’ is closed to new replies.