#2212 / #2201 - Fix notice-level errors in PageView updates

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48934 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-01-31 21:38:11 +00:00
parent 536770caca
commit b4de288995

View File

@ -66,7 +66,7 @@ class PageView extends DataObject {
private function recordFromExternal() {
$http_host = "http://".$_SERVER['HTTP_HOST'];
if (!strstr($_SERVER['HTTP_REFERER'], $http_host) && $_SERVER['HTTP_REFERER'] != null)
if (isset($_SERVER['HTTP_REFERER']) && !strstr($_SERVER['HTTP_REFERER'], $http_host) && $_SERVER['HTTP_REFERER'] != null)
$this->FromExternal = 1;
}
@ -79,7 +79,7 @@ class PageView extends DataObject {
}
private function recordReferrer() {
$this->Referrer = $_SERVER['HTTP_REFERER'];
if(isset($_SERVER['HTTP_REFERER'])) $this->Referrer = $_SERVER['HTTP_REFERER'];
}
private function recordOS() {