#9749 closed defect (bug) (fixed)
Media Upload Library view displaying multiple PHP Warning: array_key_exists() wp-admin/includes/media.php on line 736
Reported by: | lusuonline | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Media | Keywords: | wordpress mu |
Focuses: | Cc: |
Description
Found in Wordpress MU (2.7)
Using Media Upload facility on page or post on any site or blog then selecting Library produces a list of :
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /var/www/html/wp-admin/includes/media.php on line 736
Googled and found multiple solutions which changed the following :
function image_align_input_fields($post, $checked=) {
$alignments = array('none' => 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right');
if ( !array_key_exists($checked, $alignments) )
to put quotes around $checked in the array_key_exist function call like so :
if ( !array_key_exists("$checked", $alignments) )
Attachments (1)
Note: See
TracTickets for help on using
tickets.
Suggested diff from /wp-admin/includes/media.php