Skip to content

Commit 3b6c3d2

Browse files
[2.3] Remove most refs uses
1 parent 12ccb17 commit 3b6c3d2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

DataCollector/DoctrineDataCollector.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ private function sanitizeQueries($connectionName, $queries)
117117
private function sanitizeQuery($connectionName, $query)
118118
{
119119
$query['explainable'] = true;
120-
$query['params'] = (array) $query['params'];
121-
foreach ($query['params'] as $j => &$param) {
120+
if (!is_array($query['params'])) {
121+
$query['params'] = array($query['params']);
122+
}
123+
foreach ($query['params'] as $j => $param) {
122124
if (isset($query['types'][$j])) {
123125
// Transform the param according to the type
124126
$type = $query['types'][$j];
@@ -131,7 +133,7 @@ private function sanitizeQuery($connectionName, $query)
131133
}
132134
}
133135

134-
list($param, $explainable) = $this->sanitizeParam($param);
136+
list($query['params'][$j], $explainable) = $this->sanitizeParam($param);
135137
if (!$explainable) {
136138
$query['explainable'] = false;
137139
}

0 commit comments

Comments
 (0)