Skip to content

Commit

Permalink
handle unset 'path' value in parsed url
Browse files Browse the repository at this point in the history
  • Loading branch information
stklcode committed Jul 19, 2021
1 parent 613c061 commit f93a709
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class-statify-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static function track_visit( $is_snippet = false ) {
// Trim target URL, i.e. remove query parameters.
if ( $wp_rewrite->permalink_structure ) {
$parsed_target = wp_parse_url( $data['target'] );
$data['target'] = $parsed_target['path'];
$data['target'] = isset( $parsed_target['path'] ) ? $parsed_target['path'] : null;

/*
* Re-add AMP parameter to keep that information (only applicable for JS tracking).
Expand Down

0 comments on commit f93a709

Please sign in to comment.