Skip to content

Commit a16feab

Browse files
authored
Merge pull request #67 from uepg/fix-types
Fix name of var types
2 parents f92c627 + 545de37 commit a16feab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Database/Connection.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ private function compileForSelect(Builder $builder, $bindings) {
154154
$types[$tables] = $queryRes->fetchAll(PDO::FETCH_NAMED);
155155

156156
foreach ($types[$tables] as &$row) {
157-
$tipos[strtolower($row['name'])] = $row['type'];
158-
$tipos[strtolower($tables . '.' . $row['name'])] = $row['type'];
157+
$types[strtolower($row['name'])] = $row['type'];
158+
$types[strtolower($tables . '.' . $row['name'])] = $row['type'];
159159

160160
if (!empty($alias['alias'])) {
161-
$tipos[
161+
$types[
162162
strtolower($alias['alias'] . '.' . $row['name'])
163163
] = $row['type'];
164164
}
@@ -186,12 +186,12 @@ private function compileForSelect(Builder $builder, $bindings) {
186186
$i++;
187187
} else if (
188188
isset($wheres[$ind]['value']) &&
189-
isset($tipos[strtolower($wheres[$ind]['column'])])
189+
isset($types[strtolower($wheres[$ind]['column'])])
190190
) {
191191
if (is_object($wheres[$ind]['value']) === false) {
192192
if (
193193
in_array(
194-
strtolower($tipos[
194+
strtolower($types[
195195
strtolower($wheres[$ind]['column'])
196196
]),
197197
$this->withoutQuotes

0 commit comments

Comments
 (0)