Skip to content

Commit 1f2e7f1

Browse files
committed
Fix missing ! and tests
1 parent 2fe2f5e commit 1f2e7f1

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Tests/Mysqli/MysqliPreparedStatementTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ public function testPrepareParameterKeyMappingWithSingleKey()
116116

117117
$this->assertEquals(
118118
[
119-
':search' => 0,
120-
':search2' => 1,
119+
':search' => [0],
120+
':search2' => [1],
121121
],
122122
$parameterKeyMapping
123123
);

Tests/Sqlsrv/SqlsrvPreparedStatementTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public function testPrepareParameterKeyMappingWithSingleKey()
118118

119119
$this->assertEquals(
120120
[
121-
':search' => 0,
122-
':search2' => 1,
121+
':search' => [0],
122+
':search2' => [1],
123123
],
124124
$parameterKeyMapping
125125
);

src/Mysqli/MysqliStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function prepareParameterKeyMapping($sql)
197197
$literal .= substr($substring, 0, $match[1]);
198198
}
199199

200-
if (isset($mapping[$match[0]])) {
200+
if (!isset($mapping[$match[0]])) {
201201
$mapping[$match[0]][] = [];
202202
}
203203

src/Sqlsrv/SqlsrvStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function prepareParameterKeyMapping($sql)
202202
$literal .= substr($substring, 0, $match[1]);
203203
}
204204

205-
if (isset($mapping[$match[0]])) {
205+
if (!isset($mapping[$match[0]])) {
206206
$mapping[$match[0]][] = [];
207207
}
208208

0 commit comments

Comments
 (0)