mirror of
https://github.com/dg/dibi.git
synced 2025-08-10 16:14:57 +02:00
strict comparison
This commit is contained in:
@@ -94,7 +94,7 @@ class FirebirdDriver implements Dibi\Driver
|
||||
$res = ibase_query($resource, $sql);
|
||||
|
||||
if ($res === false) {
|
||||
if (ibase_errcode() == self::ERROR_EXCEPTION_THROWN) {
|
||||
if (ibase_errcode() === self::ERROR_EXCEPTION_THROWN) {
|
||||
preg_match('/exception (\d+) (\w+) (.*)/i', ibase_errmsg(), $match);
|
||||
throw new Dibi\ProcedureException($match[3], $match[1], $match[2], $sql);
|
||||
|
||||
|
@@ -67,7 +67,7 @@ class FirebirdResult implements Dibi\ResultDriver
|
||||
: @ibase_fetch_row($this->resultSet, IBASE_TEXT); // intentionally @
|
||||
|
||||
if (ibase_errcode()) {
|
||||
if (ibase_errcode() == FirebirdDriver::ERROR_EXCEPTION_THROWN) {
|
||||
if (ibase_errcode() === FirebirdDriver::ERROR_EXCEPTION_THROWN) {
|
||||
preg_match('/exception (\d+) (\w+) (.*)/is', ibase_errmsg(), $match);
|
||||
throw new Dibi\ProcedureException($match[3], $match[1], $match[2]);
|
||||
|
||||
|
@@ -64,7 +64,7 @@ class SqliteReflector implements Dibi\Reflector
|
||||
'fullname' => "$table.$column",
|
||||
'nativetype' => strtoupper($type[0]),
|
||||
'size' => isset($type[1]) ? (int) $type[1] : null,
|
||||
'nullable' => $row['notnull'] == '0',
|
||||
'nullable' => $row['notnull'] === 0,
|
||||
'default' => $row['dflt_value'],
|
||||
'autoincrement' => $row['pk'] && $type[0] === 'INTEGER',
|
||||
'vendor' => $row,
|
||||
@@ -98,7 +98,7 @@ class SqliteReflector implements Dibi\Reflector
|
||||
$column = $indexes[$index]['columns'][0];
|
||||
$primary = false;
|
||||
foreach ($columns as $info) {
|
||||
if ($column == $info['name']) {
|
||||
if ($column === $info['name']) {
|
||||
$primary = $info['vendor']['pk'];
|
||||
break;
|
||||
}
|
||||
|
@@ -627,7 +627,7 @@ XX
|
||||
if ($matches[8]) { // SQL identifier substitution
|
||||
$m = substr($matches[8], 0, -1);
|
||||
$m = $this->connection->getSubstitutes()->$m;
|
||||
return $matches[9] == ''
|
||||
return $matches[9] === ''
|
||||
? $this->formatValue($m, null)
|
||||
: $m . $matches[9]; // value or identifier
|
||||
}
|
||||
|
Reference in New Issue
Block a user