summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2014-03-05 22:04:14 +0000
committerChristopher Smith <chris@jalakai.co.uk>2014-03-05 22:04:14 +0000
commitf87b5dbbbad408da775ac4c60ceb9f9666280527 (patch)
tree53e023772e7ebeb53bad6f13e867483bbed6a683 /inc/template.php
parent6d2af55dde922ac10a288b4195b1bf338e7bc5a9 (diff)
downloadrpg-f87b5dbbbad408da775ac4c60ceb9f9666280527.tar.gz
rpg-f87b5dbbbad408da775ac4c60ceb9f9666280527.tar.bz2
use isset() + ?: or error suppression where value may not be set
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/template.php b/inc/template.php
index 0a6a9e4aa..d9aa8863f 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -210,7 +210,7 @@ function tpl_toc($return = false) {
} else {
$tocok = true;
}
- $toc = $meta['description']['tableofcontents'];
+ $toc = isset($meta['description']['tableofcontents']) ? $meta['description']['tableofcontents'] : null;
if(!$tocok || !is_array($toc) || !$conf['tocminheads'] || count($toc) < $conf['tocminheads']) {
$toc = array();
}