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/psforum.no/html/wp-admin/includes/media.php on line 736
Tried uploading all the files again, but it didn't work.
using akismet? deactivate it and try again. maybe it helps...
FIXED IT!
Here is a screenshot of the problem:
http://lastopp.no/filer/fbc567d1169154d5b4e7e4f7429cfb6e.png
Solution:
Go to your /wp-admin/media.php. Scroll down to line 736 then change
if ( !array_key_exists($checked, $alignments) )
to
if ( !array_key_exists('$checked', $alignments) )
Finally :)
coffeeaddict007
Member
Posted 3 years ago #
This helped fix my problem with Media related pages!
It should go into the next update!
Thank you emilb!
ghettocottage
Member
Posted 3 years ago #
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?
Thanks,
Jonah
mzuvella
Member
Posted 3 years ago #
Jonah,
File is /wp-admin/includes/media.php
/includes is what you're missing
--Matt
oldford
Member
Posted 3 years ago #
Thanks! Just fixed this problem on my newest install.
jeniadventure
Member
Posted 2 years ago #
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?
thanks
Jeni
akcakaya
Member
Posted 2 years ago #
Hi,
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.