mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Coding Standards: Always use strict type check for in_array().
This fixes the currently flagged `WordPress.PHP.StrictInArray.MissingTrueStrict` issues: * `Not using strict comparison for in_array; supply true for third argument.` These all do comparisons with strings, so all the more reason why it is imperative that a strict comparison is used. Follow-up to [47550], [47557], [54155], [53480]. Props jrf. See #56791. git-svn-id: https://develop.svn.wordpress.org/trunk@54895 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2879,7 +2879,7 @@ if ( ! function_exists( 'get_avatar' ) ) :
|
||||
$extra_attr .= "loading='{$loading}'";
|
||||
}
|
||||
|
||||
if ( in_array( $args['decoding'], array( 'async', 'sync', 'auto' ) ) && ! preg_match( '/\bdecoding\s*=/', $extra_attr ) ) {
|
||||
if ( in_array( $args['decoding'], array( 'async', 'sync', 'auto' ), true ) && ! preg_match( '/\bdecoding\s*=/', $extra_attr ) ) {
|
||||
if ( ! empty( $extra_attr ) ) {
|
||||
$extra_attr .= ' ';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user