summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-06 15:22:21 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-06 15:22:21 +0200
commit49aa45b45e1cc83cb61d1524ba32d6c188dac2e1 (patch)
treed8e4c4c1460d74a27b6b4d101e8a3874f890dd80 /system/database/DB_driver.php
parentd993974327dcb3b6df14488fa7d5a1a372f29bc9 (diff)
Fix a few join() bugs
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 d5367b4d2..1060ecc6c 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -970,7 +970,7 @@ abstract class CI_DB_driver {
*/
public function escape_identifiers($item)
{
- if ($this->_escape_char === '')
+ if ($this->_escape_char === '' OR empty($item))
{
return $item;
}
@@ -983,8 +983,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;
}