fix quick crypt_password bug when its passwd an empty param
[freeside.git] / FS / FS / svc_acct.pm
index 6e4213d..a045193 100644 (file)
@@ -1327,7 +1327,7 @@ sub crypt_password {
   {
     $self->_password;
   } else {
-    my $encryption = scalar(@_) ? shift : 'crypt';
+    my $encryption = ( scalar(@_) && $_[0] ) ? shift : 'crypt';
     if ( $encryption eq 'crypt' ) {
       crypt(
         $self->_password,