mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Cast to string in array_key_exists() in media.php, props lusuonline, fixes #9749
git-svn-id: http://svn.automattic.com/wordpress/trunk@11233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
193fabc6d5
commit
a1bb97313f
@ -747,10 +747,10 @@ function media_upload_library() {
|
||||
* @param unknown_type $checked
|
||||
* @return unknown
|
||||
*/
|
||||
function image_align_input_fields($post, $checked='') {
|
||||
function image_align_input_fields( $post, $checked = '' ) {
|
||||
|
||||
$alignments = array('none' => __('None'), 'left' => __('Left'), 'center' => __('Center'), 'right' => __('Right'));
|
||||
if ( !array_key_exists($checked, $alignments) )
|
||||
if ( !array_key_exists( (string) $checked, $alignments ) )
|
||||
$checked = 'none';
|
||||
|
||||
$out = array();
|
||||
@ -772,12 +772,12 @@ function image_align_input_fields($post, $checked='') {
|
||||
* @param unknown_type $checked
|
||||
* @return unknown
|
||||
*/
|
||||
function image_size_input_fields($post, $checked='') {
|
||||
function image_size_input_fields( $post, $checked = '' ) {
|
||||
|
||||
// get a list of the actual pixel dimensions of each possible intermediate version of this image
|
||||
$size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
|
||||
|
||||
foreach ( $size_names as $size => $name) {
|
||||
foreach ( $size_names as $size => $name ) {
|
||||
$downsize = image_downsize($post->ID, $size);
|
||||
|
||||
// is this size selectable?
|
||||
|
Loading…
Reference in New Issue
Block a user