diff --git a/referral.module b/referral.module
index 167944f..6aedd3e 100644
--- a/referral.module
+++ b/referral.module
@@ -548,6 +548,7 @@ function _referral_hex_seed() {
 }
 
 function _referral_asc2hex($asc_str) {
+  $hex_str = NULL;
   for ($i=0; $i<strlen($asc_str); $i++) {
     $hex_str .= sprintf("%02x", ord(substr($asc_str, $i, 1)));
   }
