From 80401c6afc165eb2033a92861039fd2fd4d43dcb Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 2 Mar 2011 08:03:12 -0600 Subject: More PHP Notice undefined fixups Signed-off-by: Dan McGee Signed-off-by: Lukas Fleischer --- web/html/packages.php | 6 +++++- web/lib/acctfuncs.inc | 3 ++- web/template/pkg_search_results.php | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'web') diff --git a/web/html/packages.php b/web/html/packages.php index c8949a4..fe69449 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -88,7 +88,11 @@ if (isset($_GET['ID'])) { $_GET['SB'] = 'v'; $_GET['SO'] = 'd'; } - pkg_search_page($_COOKIE["AURSID"]); + if (isset($_COOKIE["AURSID"])) { + pkg_search_page($_COOKIE["AURSID"]); + } else { + pkg_search_page(); + } } html_footer(AUR_VERSION); diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc index d5137be..0cd5d0e 100644 --- a/web/lib/acctfuncs.inc +++ b/web/lib/acctfuncs.inc @@ -663,7 +663,8 @@ function try_login() { if ($logged_in) { # set our SID cookie - if ($_POST['remember_me'] == "on") { + if (isset($_POST['remember_me']) && + $_POST['remember_me'] == "on") { # Set cookies for 30 days. $cookie_time = time() + $PERSISTENT_COOKIE_TIMEOUT; diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index a096862..c8c29f2 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -43,7 +43,11 @@