We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 389d108 + 9f9e1ef commit 7e365fdCopy full SHA for 7e365fd
php/class-utils.php
@@ -574,7 +574,7 @@ public static function is_rest_api() {
574
// Fallback if rest engine is not setup yet.
575
$rest_base = wp_parse_url( static::rest_url( '/' ), PHP_URL_PATH );
576
$request_uri = filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL );
577
- $is = strpos( $request_uri, $rest_base ) === 0;
+ $is = is_string( $request_uri ) && strpos( $request_uri, $rest_base ) === 0;
578
}
579
580
return $is;
0 commit comments