Skip to content

Commit

Permalink
Avoid unnecessary processing of rewrite rules if there are none.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Feb 23, 2016
1 parent 01302d4 commit 9d5403e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions collectors/rewrites.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public function process() {
return;
}

if ( empty( $wp_rewrite->rules ) ) {
return;
}

$req = $request->data['request']['request'];
$matching = array();

Expand Down

0 comments on commit 9d5403e

Please sign in to comment.