PHRAS-508_acl-cache

- fix ref on pdo stmt
This commit is contained in:
Jean-Yves Gaulier
2016-10-27 18:32:39 +02:00
parent ce0aeaff0e
commit e42bb376f8
5 changed files with 6 additions and 3 deletions

View File

@@ -1152,8 +1152,9 @@ class ACL implements cache_cacheableInterface
return $this;
}
private function try_give_access_to_base_insert(&$stmt, $base_id, $usr_id)
private function try_give_access_to_base_insert(PDOStatement $stmt, $base_id, $usr_id)
{
$stmt = null;
$inserted = false;
try {
$stmt->execute([':base_id' => $base_id, ':usr_id' => $usr_id]);
@@ -1169,7 +1170,7 @@ class ACL implements cache_cacheableInterface
return $inserted;
}
private function try_give_access_to_base_update(&$stmt, $base_id, $usr_id)
private function try_give_access_to_base_update(PDOStatement $stmt, $base_id, $usr_id)
{
$stmt->execute([':base_id' => $base_id, ':usr_id' => $usr_id]);
$stmt->closeCursor();