aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin J. Novack <jnovack@gmail.com>2012-09-16 11:27:56 -0400
committerJustin J. Novack <jnovack@gmail.com>2012-09-16 11:27:56 -0400
commitc94d0557180a41557eb85908423fa614567506f0 (patch)
treefc2f9525c1b4adbcbb587472961bbf9824b08195
parenta73791f16d10ea0e2c477f29d9049d75516aa774 (diff)
downloadphorkie-c94d0557180a41557eb85908423fa614567506f0.tar.gz
phorkie-c94d0557180a41557eb85908423fa614567506f0.zip
www/www-header.php - FIX: non-set _SESSION variables causing 'undefined index' in logs
-rw-r--r--www/www-header.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/www/www-header.php b/www/www-header.php
index 3bb7e89..74863e1 100644
--- a/www/www-header.php
+++ b/www/www-header.php
@@ -64,9 +64,11 @@ function render($tplname, $vars)
$vars['css'] = $GLOBALS['phorkie']['cfg']['css'];
$vars['title'] = $GLOBALS['phorkie']['cfg']['title'];
$vars['topbar'] = $GLOBALS['phorkie']['cfg']['topbar'];
- $vars['identity'] = $_SESSION['identity'];
- $vars['name'] = $_SESSION['name'];
- $vars['email'] = $_SESSION['email'];
+ if (isset($_SESSION['identity'])) {
+ $vars['identity'] = $_SESSION['identity'];
+ $vars['name'] = $_SESSION['name'];
+ $vars['email'] = $_SESSION['email'];
+ }
$vars['db'] = new Database();
$template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
@@ -77,4 +79,4 @@ function redirect($target)
header('Location: ' . $target);
exit();
}
-?> \ No newline at end of file
+?>