[wp-trac] [WordPress Trac] #9749: Media Upload Library view
displaying multiple PHP Warning: array_key_exists()
wp-admin/includes/media.php on line 736
WordPress Trac
wp-trac at lists.automattic.com
Thu May 7 10:55:40 GMT 2009
#9749: Media Upload Library view displaying multiple PHP Warning:
array_key_exists() wp-admin/includes/media.php on line 736
--------------------------+-------------------------------------------------
Reporter: lusuonline | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Media | Version: 2.7
Severity: normal | Keywords: wordpress mu
--------------------------+-------------------------------------------------
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) )
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9749>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list