diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-07-06 15:22:21 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-07-06 15:22:21 +0200 |
commit | 49aa45b45e1cc83cb61d1524ba32d6c188dac2e1 (patch) | |
tree | d8e4c4c1460d74a27b6b4d101e8a3874f890dd80 /system/database/DB_driver.php | |
parent | d993974327dcb3b6df14488fa7d5a1a372f29bc9 (diff) |
Fix a few join() bugs
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 6 |
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; } |