diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-09 19:19:11 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-09 19:19:11 +1000 |
| commit | 6f624991606906461454062052ef2b7df86b014b (patch) | |
| tree | 5784ecb83d74c064383156e1966d59d69f1eb9b8 /inc/functions.php | |
| parent | a9b93d27606f75ec0094702e1d0781da4815ee6b (diff) | |
Bugfix: Undefined $cached (when caching is disabled)
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index e5e33449..f19e00ae 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1082,10 +1082,10 @@ function index($page, $mod=false) { $replies = $cached['replies']; $omitted = $cached['omitted']; } else { - $cached = false; + unset($cached); } } - if (!$cached) { + if (!isset($cached)) { $posts = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE `thread` = :id ORDER BY `id` DESC LIMIT :limit", $board['uri'])); $posts->bindValue(':id', $th['id']); $posts->bindValue(':limit', ($th['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview']), PDO::PARAM_INT); |
