Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When no cookie exists we don't wan't a notice

  • Loading branch information...
commit 54b4d60b5b03ca6a48ffddab717bf6bcacaa2f01 1 parent 956b16a
@smgt smgt authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 phpab.php
View
10 phpab.php
@@ -179,7 +179,13 @@ public function get_user_segment ()
if($this->trial_mode == FALSE)
{
- $this->current_variation = $_COOKIE[$this->tag . '-' . $this->test_name];
+ $key = $this->tag . '-' . $this->test_name;
+ if(array_key_exists($key, $_COOKIE))
+ {
+ $this->current_variation = $_COOKIE[$key];
+ }
+
+ $this->current_variation = $_COOKIE[$key];
if(empty($this->current_variation))
{
$this->current_variation = '!unset';
@@ -288,4 +294,4 @@ public function run_test ()
$test_ran = TRUE;
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.