Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Missed one place where strict comparisons should be used.

  • Loading branch information...
commit 6003fae8db1812f5f164dec777dfa2658527a997 1 parent abb7b55
@posulliv authored
View
6 lib/Doctrine/DBAL/Driver/AkibanSrv/AkibanSrvStatement.php
@@ -103,14 +103,14 @@ private function convertPositionalToNumberedParameters($statement)
$inLiteral = false;
$stmtLen = strlen($statement);
for ($i = 0; $i < $stmtLen; $i++) {
- if ($statement[$i] == '?' && ! $inLiteral) {
+ if ($statement[$i] === '?' && ! $inLiteral) {
$param = "$" . $count;
$len = strlen($param);
$statement = substr_replace($statement, $param, $i, 1);
$i += $len - 1;
$stmtLen = strlen($statement);
++$count;
- } else if ($statement[$i] == "'" || $statement[$i] == '"') {
+ } else if ($statement[$i] === "'" || $statement[$i] === '"') {
$inLiteral = ! $inLiteral;
}
}
@@ -245,7 +245,7 @@ public function fetch($fetchMode = null, $rowPos = null)
throw new \InvalidArgumentException("Invalid fetch style: " . $fetchMode);
}
- if (($fetchMode == PDO::FETCH_OBJ || $fetchMode == PDO::FETCH_CLASS) &&
+ if (($fetchMode === PDO::FETCH_OBJ || $fetchMode === PDO::FETCH_CLASS) &&
$this->results &&
$this->className) {
if (empty($this->constructorArguments)) {
View
4 lib/Doctrine/DBAL/Driver/AkibanSrv/Driver.php
@@ -48,10 +48,10 @@ public function connect(array $params, $username = null, $password = null, array
private function constructConnectionString(array $params, $username, $password)
{
$connString = '';
- if (isset($params['host']) && $params['host'] != '') {
+ if (isset($params['host']) && $params['host'] !== '') {
$connString .= 'host=' . $params['host'] . ' ';
}
- if (isset($params['port']) && $params['port'] != '') {
+ if (isset($params['port']) && $params['port'] !== '') {
$connString .= 'port=' . $params['port'] . ' ';
}
if (isset($params['dbname'])) {
Please sign in to comment.
Something went wrong with that request. Please try again.