Make WordPress Core

Changeset 42692


Ignore:
Timestamp:
02/11/2018 02:52:03 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Media: Make sure $caption_id does not depend on an undefined variable.

See #34595.

File:
1 edited

Legend:

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

    r42691 r42692  
    15571557    }
    15581558
     1559    $caption_id = '';
     1560
    15591561    if ( ! empty( $atts['id'] ) ) {
    15601562        $att_id     = esc_attr( sanitize_html_class( $atts['id'] ) );
    15611563        $atts['id'] = 'id="' . $att_id . '" ';
    1562     }
    1563 
    1564     $caption_id = 'caption-' . str_replace( '_', '-', $att_id );
     1564        $caption_id = 'caption-' . str_replace( '_', '-', $att_id );
     1565    }
    15651566
    15661567    $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] );
Note: See TracChangeset for help on using the changeset viewer.