Skip to content

Commit

Permalink
fix _createTable() no longer returns bool
Browse files Browse the repository at this point in the history
  • Loading branch information
sclubricants committed Jul 13, 2022
1 parent 3370dd6 commit 711a4f7
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions system/Database/Forge.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,19 +506,6 @@ public function createTable(string $table, bool $ifNotExists = false, array $att

$sql = $this->_createTable($table, false, $attributes);

if (is_bool($sql)) {
$this->reset();
if ($sql === false) {
if ($this->db->DBDebug) {
throw new DatabaseException('This feature is not available for the database you are using.');
}

return false;
}

return true;
}

if (($result = $this->db->query($sql)) !== false) {
if (isset($this->db->dataCache['table_names']) && ! in_array($table, $this->db->dataCache['table_names'], true)) {
$this->db->dataCache['table_names'][] = $table;
Expand All @@ -538,7 +525,7 @@ public function createTable(string $table, bool $ifNotExists = false, array $att
}

/**
* @return bool|string
* @return string
*
* @deprecated $ifNotExists is no longer used, and will be removed.
*/
Expand Down

0 comments on commit 711a4f7

Please sign in to comment.