Fix becoming a super maintainer bug where we were checking of the user was a maintainer of an undefined version. Only check isMaintainer() if we have a valid version set

This commit is contained in:
Chris Morgan
2005-10-06 00:04:59 +00:00
committed by WineHQ
parent 5522e80a9e
commit 4772360bd3

View File

@@ -45,8 +45,9 @@ $appId = strip_tags($_POST['appId']);
$versionId = strip_tags($_POST['versionId']);
$superMaintainer = strip_tags($_POST['superMaintainer']);
/* if the user is already a maintainer don't add them again */
if($_SESSION['current']->isMaintainer($versionId))
/* if we have a versionId to check against see if */
/* the user is already a maintainer */
if(isset($_POST['versionId']) && $_SESSION['current']->isMaintainer($versionId))
{
echo "You are already a maintainer of this app!";
exit;