ver. 0.315: fix PDOException w listowaniu atrybutów admin

AttributeRepository::listForAdmin() przekazywał :default_lang_id
do zapytania COUNT które nie używało tego parametru — PDO zgłaszał
SQLSTATE[HY093]: Invalid parameter number.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 17:51:37 +01:00
parent 908c997b91
commit d2277c6d9d
3 changed files with 8 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ class AttributeRepository
FROM pp_shop_attributes AS sa
WHERE {$whereSql}
";
$stmtCount = $this->db->query($sqlCount, $params);
$stmtCount = $this->db->query($sqlCount, $whereData['params']);
$countRows = $stmtCount ? $stmtCount->fetchAll() : [];
$total = isset($countRows[0][0]) ? (int)$countRows[0][0] : 0;