summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-08 14:39:24 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-08 14:39:24 +0200
commit9637b40ca9e9ac1cdce2b895d3db09848a6eef76 (patch)
tree7d042090e0aa9491b9f32649b62674a5111eb766 /system/database/DB_driver.php
parent082ee2b054b0d61ac02fea3deb704290e8d6021a (diff)
escape_identifiers() to accept arrays as well
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index f559863a5..6188c9447 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -934,8 +934,8 @@ abstract class CI_DB_driver {
*
* This function escapes column and table names
*
- * @param string
- * @return string
+ * @param mixed
+ * @return mixed
*/
public function escape_identifiers($item)
{
@@ -943,6 +943,15 @@ abstract class CI_DB_driver {
{
return $item;
}
+ elseif (is_array($item))
+ {
+ foreach ($item as $key => $value)
+ {
+ $item[$key] = $this->escape_identifiers($value);
+ }
+
+ return $item;
+ }
static $preg_ec = array();