[vhffs-dev] [2028] Fixed another boolean return mistake

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 2028
Author:   gradator
Date:     2012-02-19 20:22:57 +0100 (Sun, 19 Feb 2012)
Log Message:
-----------
Fixed another boolean return mistake

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Group.pm

Modified: trunk/vhffs-api/src/Vhffs/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Group.pm	2012-02-19 19:15:18 UTC (rev 2027)
+++ trunk/vhffs-api/src/Vhffs/Group.pm	2012-02-19 19:22:57 UTC (rev 2028)
@@ -372,7 +372,7 @@
 
 	my $sql = 'INSERT INTO vhffs_user_group(uid, gid, state) VALUES(?, ?, ?)';
 	my $res = $self->{db}->do( $sql, {}, $uid, $self->{gid}, Vhffs::Constants::WAITING_FOR_CREATION );
-	return $res and $res > 0;
+	return ( defined $res and $res > 0 );
 }
 
 =pod


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/