Skip to content

Commit da310a9

Browse files
Update Builder
1 parent 2726a34 commit da310a9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Builder.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function __call(string $module = null, mixed $arguments = null): Builder
156156
public function execute(array $params = null): \PDOStatement
157157
{
158158
// prepare the statement
159-
$statement = $this->prepare(trim($this->query));
159+
$statement = $this->prepare($this->query);
160160

161161
// execute the prepared statement
162162
$statement->execute($params);
@@ -185,8 +185,7 @@ private function prepare(string $query): \PDOStatement|false
185185
*/
186186
public function get(): ?array
187187
{
188-
$results = $this->execute()->fetchAll(\PDO::FETCH_ASSOC);
189-
return $this->query !== '' ? $results : [];
188+
return $this->query !== '' ? $this->execute()->fetchAll(\PDO::FETCH_ASSOC) : [];
190189
}
191190

192191
/**

0 commit comments

Comments
 (0)