Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix bug in query closing
Browse files Browse the repository at this point in the history
  • Loading branch information
emabassi-ext committed Sep 26, 2022
1 parent 43c6daa commit c4f654e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Centreon/Domain/Repository/TopologyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ public function getReactTopologiesPerUserWithAcl($user)
. "AND acl_topology.acl_topo_id = acl_topology_relations.acl_topo_id "
. "AND acl_topology_relations.acl_topo_id = :acl_topo_id");
while ($topo_group = $DBRESULT->fetchRow()) {
$statement->bindValue(':acl_topo_id', (int) $topo_group["acl_topology_id"], \PDO::PARAM_INT);
$statement->bindValue(':acl_topo_id', $topo_group["acl_topology_id"], \PDO::PARAM_INT);
$statement->execute();
while ($topo_page = $statement->fetchRow()) {
while ($topo_page = $statement->fetch(\PDO::FETCH_ASSOC)) {
$topology[] = (int)$topo_page["topology_topology_id"];
if (!isset($tmp_topo_page[$topo_page['topology_topology_id']])) {
$tmp_topo_page[$topo_page["topology_topology_id"]] = $topo_page["access_right"];
Expand All @@ -128,8 +128,8 @@ public function getReactTopologiesPerUserWithAcl($user)
}
}
}
$statement->closeCursor();
}
$statement->closeCursor();
$DBRESULT->closeCursor();

if (count($topology)) {
Expand Down

0 comments on commit c4f654e

Please sign in to comment.