Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix PHP warnings in read.php
  • Loading branch information
acohn committed Jun 29, 2016
1 parent 0c6c9be commit 06bde4c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions read.php
Expand Up @@ -19,7 +19,7 @@
{
if (isvaliduser($dbh, $searchname)) //if valid username, change to num
{
$searchnum = get_item($mydbh, "userid", "accounts", "username", $searchname);
$searchnum = get_item($dbh, "userid", "accounts", "username", $searchname);
} else
//if is not a valid username
{
Expand Down Expand Up @@ -117,12 +117,11 @@ interface_disp_page($page);
}
//TODO should this go inside if(!$auth) ?
$guest_auth = false;
if ($guest_pass = $_GET['guest-pass']) {
if (isset($_GET['guest-pass'])) {
$real_pass = get_item($dbh, "guest_password", "accounts", "userid", $searchnum);
//error_log("JLW real pass is $real_pass");
if ($real_pass == '') {
$guest_auth = false;
} else if ($real_pass == $guest_pass) {
} else if ($real_pass == $_GET['guest-pass']) {
$guest_auth = true;
} else {
$guest_auth = false;
Expand All @@ -145,7 +144,7 @@ interface_disp_page($page);
$page->append($blocked_msg);
} else {
// If we're redirecting from edit.php, assure the user that their change was applied
if ($_GET['edit_submit'] == 1) {
if (isset($_GET['edit_submit']) && $_GET['edit_submit'] == 1) {
$changed_msg = new InfoText('Plan changed successfully.');
$page->append($changed_msg);
}
Expand Down

0 comments on commit 06bde4c

Please sign in to comment.