mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Coding Standards: Use strict type check for in_array() and array_search().
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core. Includes minor code layout fixes for better readability. Follow-up to [47550]. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47557 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -238,7 +238,7 @@ class WP_Http_Curl {
|
||||
curl_close( $handle );
|
||||
return new WP_Error( 'http_request_failed', $curl_error );
|
||||
}
|
||||
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) {
|
||||
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ), true ) ) {
|
||||
curl_close( $handle );
|
||||
return new WP_Error( 'http_request_failed', __( 'Too many redirects.' ) );
|
||||
}
|
||||
@@ -286,7 +286,7 @@ class WP_Http_Curl {
|
||||
return new WP_Error( 'http_request_failed', $curl_error );
|
||||
}
|
||||
}
|
||||
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) {
|
||||
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ), true ) ) {
|
||||
curl_close( $handle );
|
||||
return new WP_Error( 'http_request_failed', __( 'Too many redirects.' ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user