Skip to content

Commit

Permalink
Ensure $request_path is set to some value
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber authored and bradyvercher committed May 23, 2019
1 parent bcb2d76 commit af03db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Provider/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected function get_request_path(): string {
$request_path = wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );

$wp_base = get_home_url( null, '/', 'relative' );
if ( 0 === strpos( $request_path, $wp_base ) ) {
if ( $request_path && 0 === strpos( $request_path, $wp_base ) ) {
$request_path = substr( $request_path, \strlen( $wp_base ) );
}

Expand Down

0 comments on commit af03db0

Please sign in to comment.