diff options
| author | Justin J. Novack <jnovack@gmail.com> | 2012-09-16 11:27:56 -0400 |
|---|---|---|
| committer | Justin J. Novack <jnovack@gmail.com> | 2012-09-16 11:27:56 -0400 |
| commit | c94d0557180a41557eb85908423fa614567506f0 (patch) | |
| tree | fc2f9525c1b4adbcbb587472961bbf9824b08195 | |
| parent | a73791f16d10ea0e2c477f29d9049d75516aa774 (diff) | |
| download | phorkie-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.php | 10 |
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 +?> |
