BUGFIX: forgot to set default values for some new variables
authorArun Persaud <arun@nubati.net>
Mon, 19 May 2008 00:45:03 +0000 (17:45 -0700)
committerArun Persaud <arun@nubati.net>
Mon, 19 May 2008 00:45:03 +0000 (17:45 -0700)
$GAME['schweinchen-who'] was not necessary defined

Signed-off-by: Arun Persaud <arun@nubati.net>
include/game.php

index bbaa5b3500a2e945c5d4a2b113806b0cdb4f2d40..a90d8b2dea1418bfdd3be82a2461a92a7b216dc0 100644 (file)
@@ -26,6 +26,8 @@ if(!$myid)
     exit();
   }
 
     exit();
   }
 
+global $GAME,$RULES,$CARDS;
+
 /* user might get here by clicking on the link in an email, so session might not be set */
 if(isset($_SESSION["name"]))
   output_status($_SESSION["name"]);
 /* user might get here by clicking on the link in an email, so session might not be set */
 if(isset($_SESSION["name"]))
   output_status($_SESSION["name"]);
@@ -76,6 +78,11 @@ else
        $ok=1;
   }
 
        $ok=1;
   }
 
+/* these are the defaults */
+$GAME['schweinchen-who']    = NULL;
+$GAME['schweinchen-first']  = NULL;
+$GAME['schweinchen-second'] = NULL;
+
 if($ok)
 {
   /* need to check for Schweinchen */
 if($ok)
 {
   /* need to check for Schweinchen */
@@ -89,11 +96,6 @@ if($ok)
   $GAME['schweinchen-first']  = 0; /* to keep track if they have been played already */
   $GAME['schweinchen-second'] = 0;
 }
   $GAME['schweinchen-first']  = 0; /* to keep track if they have been played already */
   $GAME['schweinchen-second'] = 0;
 }
-else
-{
-  /* no need to check for Schweinchen */
-  $GAME['schweinchen-who']=NULL;
-}
 /* end check for Schweinchen */
 
 set_gametype($gametype); /* this sets the $CARDS variable */
 /* end check for Schweinchen */
 
 set_gametype($gametype); /* this sets the $CARDS variable */