mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-05 17:50:03 +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:
@@ -596,7 +596,7 @@ function url_to_postid( $url ) {
|
||||
parse_str( $query, $query_vars );
|
||||
$query = array();
|
||||
foreach ( (array) $query_vars as $key => $value ) {
|
||||
if ( in_array( $key, $wp->public_query_vars, true ) ) {
|
||||
if ( in_array( (string) $key, $wp->public_query_vars, true ) ) {
|
||||
$query[ $key ] = $value;
|
||||
if ( isset( $post_type_query_vars[ $key ] ) ) {
|
||||
$query['post_type'] = $post_type_query_vars[ $key ];
|
||||
|
||||
Reference in New Issue
Block a user