[wpmu-trac] [WordPress MU Trac] #897: array_key_exists gives a
warning
WordPress MU Trac
wpmu-trac at lists.automattic.com
Thu Feb 12 14:36:19 GMT 2009
#897: array_key_exists gives a warning
------------------------+---------------------------------------------------
Reporter: Sixes | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: component1 | Version:
Severity: normal | Keywords:
------------------------+---------------------------------------------------
== File wp-admin/includes/media.php ==
$checked can be an empty string.
== Fix ==
{{{
Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php (revision 1655)
+++ wp-admin/includes/media.php (working copy)
@@ -733,7 +733,7 @@
function image_align_input_fields($post, $checked='') {
$alignments = array('none' => 'None', 'left' => 'Left', 'center'
=> 'Center', 'right' => 'Right');
- if ( !array_key_exists($checked, $alignments) )
+ if ( $checked == '' || !array_key_exists($checked, $alignments) )
$checked = 'none';
$out = array();
}}}
--
Ticket URL: <http://trac.mu.wordpress.org/ticket/897>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser
More information about the wpmu-trac
mailing list