From cd76a33bde02cf68535e731d9f55017b39b9c4e6 Mon Sep 17 00:00:00 2001 From: "mheitzenroder@gmail.com" Date: Fri, 14 Sep 2007 02:56:13 +0000 Subject: [PATCH] Issue 49: PHP NOTICES from missing index keys in GET array. Changed conditionals to check first if the key is set, before checking it's value. --- admin/index.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/index.php b/admin/index.php index fba1e52..dd27b81 100644 --- a/admin/index.php +++ b/admin/index.php @@ -151,13 +151,13 @@ if ($user->isAdmin()) {

 

isAdmin()) { } } ?> -
name="frmAdd" class="newpost"> + name="frmAdd" class="newpost">
isAdmin()) { $url = ($isEdition) ? $post["url"] : ""; - switch ($_GET["new"]) { + switch (isset($_GET["new"]) && $_GET["new"]) { case "post": $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}"); $output = array("1", $date, $_SESSION['user_id'], $title, $body);