fix: Fix FETCH_KEY_PAIR error in defaultSettings
This commit is contained in:
parent
d03aff714f
commit
9ed90ca6dd
|
|
@ -277,8 +277,11 @@ class AdminController extends Model
|
||||||
return $response->withHeader('Location', '/')->withStatus(302);
|
return $response->withHeader('Location', '/')->withStatus(302);
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = $this->pdo->query("SELECT * FROM default_settings ORDER BY id");
|
$stmt = $this->pdo->query("SELECT setting_key, setting_value FROM default_settings ORDER BY id");
|
||||||
$settings = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
|
$settings = [];
|
||||||
|
while ($row = $stmt->fetch()) {
|
||||||
|
$settings[$row['setting_key']] = $row['setting_value'];
|
||||||
|
}
|
||||||
|
|
||||||
return $this->twig->render($response, 'admin/defaults.twig', [
|
return $this->twig->render($response, 'admin/defaults.twig', [
|
||||||
'title' => 'Дефолтные параметры',
|
'title' => 'Дефолтные параметры',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue