Skip to content

Commit

Permalink
correcao de bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Morais authored and Bruno Morais committed Nov 20, 2023
1 parent b975790 commit 7e5a2f4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/Crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function update(string $fields, array $values = null, string $where = nul
$fields_T .= ", {$item} = ?";
}
$fields_T = substr($fields_T, 2);
$sql = "UPDATE {{$this->getTable()}} SET {$fields_T}";
$sql = "UPDATE {$this->getTable()} SET {$fields_T}";
if (isset($where)) {
$sql .= " WHERE $where";
}
Expand Down
4 changes: 0 additions & 4 deletions src/DatalayerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ protected function getInstance(): PDO
*/
protected function setDatabase(string $database): self
{
if (strpos($_SERVER['SERVER_NAME'], mb_strtolower(CONFIG_DATA_LAYER["homologation"])) && !strpos($this->getDatabase(), ucfirst(CONFIG_DATA_LAYER["homologation"]))) {
$database = $database.ucfirst(CONFIG_DATA_LAYER["homologation"] ?? "");
}

$this->database = $database;
$this->setInstance(null)->getInstance();
return $this;
Expand Down

0 comments on commit 7e5a2f4

Please sign in to comment.