silence a warning when creating contacts
authorMark Wells <mark@freeside.biz>
Thu, 8 Dec 2016 00:56:47 +0000 (16:56 -0800)
committerMark Wells <mark@freeside.biz>
Thu, 8 Dec 2016 00:56:47 +0000 (16:56 -0800)
FS/FS/Password_Mixin.pm

index 2e400ec..963fa54 100644 (file)
@@ -212,8 +212,9 @@ sub insert_password_history {
     }
   
   } else {
-    warn "unrecognized password encoding '$encoding'; treating as plain text"
-      unless $encoding eq 'plain';
+    if ($encoding and $encoding ne 'plain') {
+      warn "unrecognized password encoding '$encoding'; treating as plain text";
+    }
 
     $auth = $self->_blowfishcrypt( $password );