Support » Fixing WordPress » 2.7 Upload New Media – Warning: array_key_exists()

  • Resolved emilb


    I get thist warning after upgraded to 2.7. Problem occurs whenever I try uploading pictures, and when I access the Media Library.

    Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /nfs/c03/h02/mnt/50559/domains/ on line 736

Viewing 11 replies - 1 through 11 (of 11 total)
  • Tried uploading all the files again, but it didn’t work.

    using akismet? deactivate it and try again. maybe it helps…

    I do not use Akismet.

    Here is a screenshot of the problem:


    Go to your /wp-admin/media.php. Scroll down to line 736 then change
    if ( !array_key_exists($checked, $alignments) )
    if ( !array_key_exists('$checked', $alignments) )

    Finally 🙂

    This helped fix my problem with Media related pages!
    It should go into the next update!
    Thank you emilb!

    This also fixed the same problem using WordPress mu 2.7 beta. Thanks

    Hmmm, I’m having this same issue and I only have 121 lines in my /wp-admin/media.php file. Is this the correct file?

    Anybody else have any other ideas for this?



    File is /wp-admin/includes/media.php

    /includes is what you’re missing


    Thanks! Just fixed this problem on my newest install.

    I made the php change but I still get an error message saying:
    The uploaded file could not be moved to /nfs/www/WWW_pages/lsraa/wp-content/uploads. when I use the Flash uploader and the browser uploader.

    I used ftp to manually put the images into the .wp-content/uploads dir and they do not show up in the media library.
    Any other ideas?

    if you dont set your media size from Settings->Media menu you can see this error. Certain solution is to set Thumbnail size, Medium size and Large size from Settings->Media menu.

    Have a nice day.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘2.7 Upload New Media – Warning: array_key_exists()’ is closed to new replies.