Skip to content

Commit

Permalink
Check host key in parsed referrer URL (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
herrvigg committed Aug 8, 2022
1 parent cf1af2a commit ca1e260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qtranslate_core.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function qtranxf_detect_language( &$url_info ) {

if ( $parse_referrer_language ) {
$ref_info = qtranxf_parseURL( $http_referer );
if ( ! qtranxf_external_host( $ref_info['host'] ) ) {
if ( isset( $ref_info['host'] ) && ! qtranxf_external_host( $ref_info['host'] ) ) {
// determine $ref_info['path-base']
qtranxf_complete_url_info( $ref_info );
if ( isset( $ref_info['path-base'] ) ) {
Expand Down

0 comments on commit ca1e260

Please sign in to comment.