mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
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. Built from https://develop.svn.wordpress.org/trunk@42860 git-svn-id: http://core.svn.wordpress.org/trunk@42690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b05cb5e5ed
commit
8a701e5b3f
@ -1047,7 +1047,8 @@ function wp_kses_attr( $element, $attr, $allowed_html, $allowed_protocols ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Are any attributes allowed at all for this element?
|
// Are any attributes allowed at all for this element?
|
||||||
if ( ! isset( $allowed_html[ strtolower( $element ) ] ) || true === $allowed_html[ strtolower( $element ) ] || count( $allowed_html[ strtolower( $element ) ] ) == 0 ) {
|
$element_low = strtolower( $element );
|
||||||
|
if ( empty( $allowed_html[ $element_low ] ) || true === $allowed_html[ $element_low ] ) {
|
||||||
return "<$element$xhtml_slash>";
|
return "<$element$xhtml_slash>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-42858';
|
$wp_version = '5.0-alpha-42860';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user