[Rt-commit] r5740 - rt/branches/3.6-RELEASE/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Wed Aug 9 02:48:35 EDT 2006
Author: ruz
Date: Wed Aug 9 02:48:35 2006
New Revision: 5740
Modified:
rt/branches/3.6-RELEASE/lib/RT/User_Overlay.pm
Log:
* drop uninit wornings
* "... eq undef" is bad code
Modified: rt/branches/3.6-RELEASE/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/User_Overlay.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/User_Overlay.pm Wed Aug 9 02:48:35 2006
@@ -1096,18 +1096,11 @@
sub HasPassword {
my $self = shift;
- if ( ( $self->__Value('Password') eq '' )
- || ( $self->__Value('Password') eq undef ) )
- {
-
- return (undef);
- }
- if ( $self->__Value('Password') eq '*NO-PASSWORD*' ) {
- return undef;
- }
-
+ my $pwd = $self->__Value('Password');
+ return undef if !defined $pwd
+ || $pwd eq ''
+ || $pwd eq '*NO-PASSWORD*';
return 1;
-
}
More information about the Rt-commit
mailing list