diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2020-04-05 17:00:18 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2020-04-05 21:59:56 +0200 |
commit | 169607f153f1dcb7bb8e7ebea1c53bac93d376b3 (patch) | |
tree | ec85807b66e7c2f433d7c14419d04904750e81ea /web/html | |
parent | 1369eb87b3ff29f13855c10ad0c5c6d4e6bdfe49 (diff) | |
download | aur-169607f153f1dcb7bb8e7ebea1c53bac93d376b3.tar.gz aur-169607f153f1dcb7bb8e7ebea1c53bac93d376b3.tar.xz |
Fix PHP notices in the account formorigin/live
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/account.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web/html/account.php b/web/html/account.php index c05d136d..d70f4ced 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -25,7 +25,7 @@ if ($action == "UpdateAccount") { $update_account_message = ''; /* Details for account being updated */ /* Verify user permissions and that the request is a valid POST */ - if (can_edit_account($row) && check_token()) { + if ($row && can_edit_account($row) && check_token()) { /* Update the details for the existing account */ list($success, $update_account_message) = process_account_form( "edit", "UpdateAccount", @@ -55,7 +55,7 @@ if ($action == "UpdateAccount") { } } -if ($action == "AccountInfo") { +if ($row && $action == "AccountInfo") { html_header(__('Account') . ' ' . $row['Username']); } else { html_header(__('Accounts')); @@ -122,7 +122,7 @@ if (isset($_COOKIE["AURSID"])) { } elseif ($action == "DeleteAccount") { /* Details for account being deleted. */ - if (can_edit_account($row)) { + if ($row && can_edit_account($row)) { $uid_removal = $row['ID']; $uid_session = uid_from_sid($_COOKIE['AURSID']); $username = $row['Username']; @@ -155,7 +155,7 @@ if (isset($_COOKIE["AURSID"])) { } elseif ($action == "UpdateAccount") { print $update_account_message; - if (!$success) { + if ($row && !$success) { display_account_form("UpdateAccount", in_request("U"), in_request("T"), @@ -181,7 +181,7 @@ if (isset($_COOKIE["AURSID"])) { } } elseif ($action == "ListComments") { - if (has_credential(CRED_ACCOUNT_LIST_COMMENTS, array($row["ID"]))) { + if ($row && has_credential(CRED_ACCOUNT_LIST_COMMENTS, array($row["ID"]))) { # display the comment list if they're a TU/dev $total_comment_count = account_comments_count($row["ID"]); |