Skip to content
Snippets Groups Projects
Unverified Commit 314e6d00 authored by Thomas Steur's avatar Thomas Steur Committed by GitHub
Browse files

Merge pull request #52 from matomo-org/scriptnamenotdefined

Prevent notice script_name not defined
parents 172c68f9 cabcdc4b
Branches
No related merge requests found
......@@ -1811,11 +1811,13 @@ class PiwikTracker
}
}
}
if (empty($url)) {
if (empty($url) && isset($_SERVER['SCRIPT_NAME'])) {
$url = $_SERVER['SCRIPT_NAME'];
} elseif (empty($url)) {
$url = '/';
}
if ($url[0] !== '/') {
if (!empty($url) && $url[0] !== '/') {
$url = '/' . $url;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment