summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2022-12-24 10:47:29 -0500
committerspiderr <spiderr@bitweaver.org>2022-12-24 10:47:29 -0500
commitc2fc1402cdff299dcf2c0042f67c67f8ed2f7d14 (patch)
treec15ff82cd16b3df583fd83e3f9f130d0403ba8d0 /includes
parent468ce027a2b166d21e22ec7657fc06990ce86599 (diff)
downloadstats-c2fc1402cdff299dcf2c0042f67c67f8ed2f7d14.tar.gz
stats-c2fc1402cdff299dcf2c0042f67c67f8ed2f7d14.tar.bz2
stats-c2fc1402cdff299dcf2c0042f67c67f8ed2f7d14.zip
count( ref ) check
Diffstat (limited to 'includes')
-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', '' ));