WordPress.org

Make WordPress Core

Changeset 18856


Ignore:
Timestamp:
10/01/11 15:54:52 (3 years ago)
Author:
ryan
Message:

Don't use wp_parse_args() on non associative array. Props SergeyBiryukov. see #18268

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/kses.php

    r18827 r18856  
    501501 */ 
    502502function wp_kses($string, $allowed_html, $allowed_protocols = array ()) { 
    503     $allowed_protocols = wp_parse_args( $allowed_protocols, wp_allowed_protocols() ); 
     503    if ( empty( $allowed_protocols ) ) 
     504        $allowed_protocols = wp_allowed_protocols(); 
    504505    $string = wp_kses_no_null($string); 
    505506    $string = wp_kses_js_entities($string); 
Note: See TracChangeset for help on using the changeset viewer.