mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 07:04:34 +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:
@@ -1041,7 +1041,7 @@ class WP_Http {
|
||||
|
||||
// POST requests should not POST to a redirected location.
|
||||
if ( 'POST' == $args['method'] ) {
|
||||
if ( in_array( $response['response']['code'], array( 302, 303 ) ) ) {
|
||||
if ( in_array( $response['response']['code'], array( 302, 303 ), true ) ) {
|
||||
$args['method'] = 'GET';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user