mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-18 09:04:44 +01:00
Bugfix: Undefined $cached (when caching is disabled)
This commit is contained in:
parent
ec9e79e4f5
commit
5421b2fb9d
@ -1082,10 +1082,10 @@ function index($page, $mod=false) {
|
|||||||
$replies = $cached['replies'];
|
$replies = $cached['replies'];
|
||||||
$omitted = $cached['omitted'];
|
$omitted = $cached['omitted'];
|
||||||
} else {
|
} 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 = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE `thread` = :id ORDER BY `id` DESC LIMIT :limit", $board['uri']));
|
||||||
$posts->bindValue(':id', $th['id']);
|
$posts->bindValue(':id', $th['id']);
|
||||||
$posts->bindValue(':limit', ($th['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview']), PDO::PARAM_INT);
|
$posts->bindValue(':limit', ($th['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview']), PDO::PARAM_INT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user