Permalink
Browse files

if properties are empty skip them

  • Loading branch information...
1 parent 1c57d77 commit 5c8cea3fe795b61d5765e1b465f74bff74e4c9cf @dkullmann committed Apr 3, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 controllers/components/mixpanel.php
@@ -40,8 +40,10 @@ public function identify($id) {
*/
public function register($properties) {
$register = $this->Session->read('Mixpanel.register');
- foreach($properties as $key => $value) {
- $register[$key] = $value;
+ if (!empty($properties)) {
+ foreach($properties as $key => $value) {
+ $register[$key] = $value;
+ }
}
$this->Session->write('Mixpanel.register', $register);
}

0 comments on commit 5c8cea3

Please sign in to comment.