summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-08 21:43:22 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-08 21:43:22 +0200
commitadedaf05449112a5ede4a3bc722a9a153b4aa2a3 (patch)
treed9e6a538e140b5076a926151bbe261a960e84417 /system/database/DB_driver.php
parentbd6116a63899c5efcf35e175b3db14b1f05c60a9 (diff)
parent0db81b6c82c2f86a6e9da26ab5501ba65cb4c4e1 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/db_subdrivers
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index eca2e68a7..e9efc8914 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -971,7 +971,7 @@ abstract class CI_DB_driver {
*/
public function escape_identifiers($item)
{
- if ($this->_escape_char === '')
+ if ($this->_escape_char === '' OR empty($item))
{
return $item;
}
@@ -984,8 +984,8 @@ abstract class CI_DB_driver {
return $item;
}
- // Avoid breaking functions inside queries
- elseif (strpos($item, '(') !== FALSE)
+ // Avoid breaking functions and literal values inside queries
+ elseif (ctype_digit($item) OR $item[0] === "'" OR strpos($item, '(') !== FALSE)
{
return $item;
}