summaryrefslogtreecommitdiffstats
path: root/system/database/DB_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-10-17 17:22:43 +0200
committerAndrey Andreev <narf@devilix.net>2016-10-17 17:22:43 +0200
commitda270b26d7cb9c55385150659ecfb7d2d97b4c63 (patch)
tree7a6e37f5e1b0d46bb40e2d7ff03340b10244e9bd /system/database/DB_forge.php
parentc34a3d6d052d2b7ba7955ea2bc70039ce0405b68 (diff)
Fix #4851
Diffstat (limited to 'system/database/DB_forge.php')
-rw-r--r--system/database/DB_forge.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 826aa1ebf..ed6f4b672 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -184,7 +184,7 @@ abstract class CI_DB_forge {
{
return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE;
}
- elseif ( ! $this->db->query(sprintf($this->_create_database, $db_name, $this->db->char_set, $this->db->dbcollat)))
+ elseif ( ! $this->db->query(sprintf($this->_create_database, $this->db->escape_identifiers($db_name), $this->db->char_set, $this->db->dbcollat)))
{
return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE;
}
@@ -211,7 +211,7 @@ abstract class CI_DB_forge {
{
return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE;
}
- elseif ( ! $this->db->query(sprintf($this->_drop_database, $db_name)))
+ elseif ( ! $this->db->query(sprintf($this->_drop_database, $this->db->escape_identifiers($db_name))))
{
return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE;
}