Skip to content

Commit

Permalink
put secure function in execution PdoConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
roboxon committed Oct 20, 2023
1 parent adeb347 commit 5ac14d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/database/PdoConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,11 @@ public function execute(): bool
$this->affectedRows = $this->stsment->rowCount();
$this->lastInsertedId = $this->db->lastInsertId();
$this->endExecutionTime = microtime(true);
$this->secure();
} catch (\PDOException $e) {
$this->endExecutionTime = microtime(true);
$this->error = $e->getMessage();
$this->secure();
}
if (!isset($this->error)) {
$this->endExecutionTime = microtime(true);
Expand All @@ -172,8 +174,9 @@ public function execute(): bool
} else {
$this->error = 'PDO statement is NULL';
$this->endExecutionTime = microtime(true);
$this->secure();
}

$this->secure();
return false;
}

Expand Down

0 comments on commit 5ac14d9

Please sign in to comment.