diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-11-24 22:37:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 22:37:11 +0300 |
commit | af4d6002ca0039f4ea702aa8456f7e0c1cc3746c (patch) | |
tree | a4eff4aee35b5decb9fac3e6e9ddcf525fcea841 /plugins/Actions | |
parent | 6ddf4edf640b3ccb4f8a7a5797d2762bab1ea682 (diff) |
Further improvements for PHP 8.1 (#18330)
* Fix some PHP8.1 deprecation warnings
* another fix
* couple more fixes
* couple more fixes
* fix another warning
Diffstat (limited to 'plugins/Actions')
-rw-r--r-- | plugins/Actions/VisitorDetails.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Actions/VisitorDetails.php b/plugins/Actions/VisitorDetails.php index 86330f1603..e850e2fb06 100644 --- a/plugins/Actions/VisitorDetails.php +++ b/plugins/Actions/VisitorDetails.php @@ -153,7 +153,7 @@ class VisitorDetails extends VisitorDetailsAbstract // Reconstruct url from prefix if (array_key_exists('url', $action) && array_key_exists('url_prefix', $action)) { - if (stripos($action['url'], 'http://') !== 0 && stripos($action['url'], 'https://') !== 0) { + if ($action['url'] && stripos($action['url'], 'http://') !== 0 && stripos($action['url'], 'https://') !== 0) { $url = PageUrl::reconstructNormalizedUrl($action['url'], $action['url_prefix']); $url = Common::unsanitizeInputValue($url); $action['url'] = $url; @@ -162,7 +162,7 @@ class VisitorDetails extends VisitorDetailsAbstract unset($action['url_prefix']); } - if (array_key_exists('url', $action) && strpos($action['url'], 'http://') === 0) { + if (!empty($action['url']) && strpos($action['url'], 'http://') === 0) { $host = parse_url($action['url'], PHP_URL_HOST); if ($host && PageUrl::shouldUseHttpsHost($visitorDetails['idSite'], $host)) { |