summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/bit_setup_inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php
index 0ceff6a..adb5695 100644
--- a/includes/bit_setup_inc.php
+++ b/includes/bit_setup_inc.php
@@ -31,7 +31,7 @@ if( $gBitSystem->isPackageActive( 'stats' )) {
if( !$gBitUser->isRegistered() && !empty( $_SERVER['HTTP_REFERER'] ) && strlen( $_SERVER['HTTP_REFERER'] ) > 9 ) {
// Explode the HTTP_REFERER address to split up the string
if( $ref = explode('/', $_SERVER['HTTP_REFERER']) ) {
- if( $ref[2] != $_SERVER['HTTP_HOST'] ) {
+ if( count( $ref ) > 1 && $ref[2] != $_SERVER['HTTP_HOST'] ) {
// we have a standard refering URL
if( empty( $_COOKIE['referer_url'] ) ) {
setcookie( 'referer_url', $_SERVER['HTTP_REFERER'], time()+60*60*24*180, $gBitSystem->getConfig( 'cookie_path', BIT_ROOT_URL ), $gBitSystem->getConfig( 'cookie_domain', '' ));