WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/20/2018 09:34:15 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Formatting: Avoid a PHP 7.2 warning in wp_kses_attr() when one of $allowedtags elements is an uncountable value.

Props andrei0x309, soulseekah, SergeyBiryukov.
Fixes #43312.

File:
1 edited

Legend:

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

    r42712 r42860  
    10481048
    10491049    // Are any attributes allowed at all for this element?
    1050     if ( ! isset( $allowed_html[ strtolower( $element ) ] ) || true === $allowed_html[ strtolower( $element ) ] || count( $allowed_html[ strtolower( $element ) ] ) == 0 ) {
     1050    $element_low = strtolower( $element );
     1051    if ( empty( $allowed_html[ $element_low ] ) || true === $allowed_html[ $element_low ] ) {
    10511052        return "<$element$xhtml_slash>";
    10521053    }
Note: See TracChangeset for help on using the changeset viewer.