Skip to content

Commit bc6e9fc

Browse files
committed
Fix problem when execute statement dont produce data
1 parent e7aa966 commit bc6e9fc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/SQL/Driver.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
use Simples\Persistence\SQL\Operations\Update;
1515
use stdClass;
1616
use Throwable;
17-
use function is_array;
18-
use function runnable;
1917

2018
/**
2119
* Class SQLDriver
@@ -31,6 +29,7 @@ abstract class Driver extends Connection implements Persistence
3129
/**
3230
* SQLDriver constructor.
3331
* @param array $settings
32+
* @throws SimplesRunTimeError
3433
*/
3534
public function __construct(array $settings)
3635
{
@@ -108,9 +107,8 @@ public function read(array $clausules, array $values = []): array
108107
if (!$statement) {
109108
throw new SimplesPersistenceError([$sql, $parameters]);
110109
}
111-
if (!$statement->execute($parameters)) {
112-
throw new SimplesPersistenceDataError([$statement->errorInfo()], [$sql, $parameters]);
113-
}
110+
$statement->execute($parameters);
111+
// throw new SimplesPersistenceDataError([$statement->errorInfo()], [$sql, $parameters]);
114112

115113
// [PDO::FETCH_CLASS, 'person']
116114
if (is_array($fetch)) {

0 commit comments

Comments
 (0)