Permalink
Browse files

Fix bug where current path is always matched if redirect_from = /

  • Loading branch information...
1 parent 4b9d99c commit 9fba5d3b7d72949343dfaf4623c220ab99302a9d @tlovett1 committed Oct 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 safe-redirect-manager.php
@@ -728,7 +728,7 @@ public function action_parse_request() {
$matched_path = ( untrailingslashit( $requested_path ) == $redirect_from );
// check if the redirect_from ends in a wildcard
- if ( !$matched_path && (strrpos( $redirect_from, '*' ) == strlen( $redirect_from ) - 1) ) {
+ if ( !$matched_path && (strrpos( $redirect_from, '*' ) === strlen( $redirect_from ) - 1) ) {
$wildcard_base = substr( $redirect_from, 0, strlen( $redirect_from ) - 1 );
// mark as match if requested path matches the base of the redirect from

0 comments on commit 9fba5d3

Please sign in to comment.