From c19a2f51454df71e0fee89ece7765ba35bdc9244 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 13 Aug 2008 10:40:19 +0000 Subject: Some safety fixes for the new form views git-svn-id: https://code.elgg.org/elgg/trunk@1881 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/input/button.php | 2 +- views/default/input/form.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/views/default/input/button.php b/views/default/input/button.php index 8fa240a3b..9a72f38b0 100644 --- a/views/default/input/button.php +++ b/views/default/input/button.php @@ -24,7 +24,7 @@ $class = $vars['class']; if (!$class) $class = "submit_button"; - $type = strtolower($vars['type']); + if (isset($vars['type'])) { $type = strtolower($vars['type']); } else { $type = 'submit'; } switch ($type) { case 'button' : $type='button'; break; diff --git a/views/default/input/form.php b/views/default/input/form.php index 8be0cc5db..2931fb07c 100644 --- a/views/default/input/form.php +++ b/views/default/input/form.php @@ -18,8 +18,8 @@ * */ - $id = $vars['internalid']; - $name = $vars['internalname']; + if (isset($vars['internalid'])) { $id = $vars['internalid']; } else { $id = ''; } + if (isset($vars['internalname'])) { $name = $vars['internalname']; } else { $name = ''; } $body = $vars['body']; $action = $vars['action']; if (isset($vars['enctype'])) { $enctype = $vars['enctype']; } else { $enctype = ''; } -- cgit v1.2.3