Make WordPress Core


Ignore:
Timestamp:
05/07/2009 05:28:51 PM (15 years ago)
Author:
azaozz
Message:

Cast to string in array_key_exists() in media.php, props lusuonline, fixes #9749

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r11204 r11233  
    748748 * @return unknown
    749749 */
    750 function image_align_input_fields($post, $checked='') {
     750function image_align_input_fields( $post, $checked = '' ) {
    751751
    752752    $alignments = array('none' => __('None'), 'left' => __('Left'), 'center' => __('Center'), 'right' => __('Right'));
    753     if ( !array_key_exists($checked, $alignments) )
     753    if ( !array_key_exists( (string) $checked, $alignments ) )
    754754        $checked = 'none';
    755755
     
    773773 * @return unknown
    774774 */
    775 function image_size_input_fields($post, $checked='') {
     775function image_size_input_fields( $post, $checked = '' ) {
    776776
    777777        // get a list of the actual pixel dimensions of each possible intermediate version of this image
    778778        $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
    779779
    780         foreach ( $size_names as $size => $name) {
     780        foreach ( $size_names as $size => $name ) {
    781781            $downsize = image_downsize($post->ID, $size);
    782782
Note: See TracChangeset for help on using the changeset viewer.