[4/4] Suppress warning on unset SSH key

Message ID 20170226210452.8377-4-lfleischer@archlinux.org
State Accepted, archived
Headers show
Series [1/4] Fix SQL query used for creating new accounts | expand

Commit Message

Lukas Fleischer Feb. 26, 2017, 9:04 p.m. UTC
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
---
 web/lib/acctfuncs.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index 63ab4b4..a6eab27 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -244,7 +244,7 @@  function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C=""
 					"<strong>", htmlspecialchars($E,ENT_QUOTES), "</strong>");
 		}
 	}
-	if (!$error && count($ssh_keys) > 0) {
+	if (!$error && isset($ssh_keys) && count($ssh_keys) > 0) {
 		/*
 		 * Check whether any of the SSH public keys is already in use.
 		 * TODO: Fix race condition.