Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-11-24 22:37:11 +0300
committerGitHub <noreply@github.com>2021-11-24 22:37:11 +0300
commitaf4d6002ca0039f4ea702aa8456f7e0c1cc3746c (patch)
treea4eff4aee35b5decb9fac3e6e9ddcf525fcea841 /plugins/Actions
parent6ddf4edf640b3ccb4f8a7a5797d2762bab1ea682 (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.php4
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)) {