summaryrefslogtreecommitdiffstats
path: root/system/database/DB_active_rec.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-05-24 18:42:16 +0200
committerAndrey Andreev <narf@bofh.bg>2012-05-24 18:42:16 +0200
commitbc602d8b8e125597bfd557949e846ff5a258b858 (patch)
treee79ff5c3eb78bb152fc04f45cc9c175f157a6ff8 /system/database/DB_active_rec.php
parenta11626a352862a3d240215be9a3d0ad912b8829a (diff)
Fix issue #1387
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r--system/database/DB_active_rec.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 841ede28e..10febb1fc 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -255,7 +255,7 @@ class CI_DB_active_record extends CI_DB_driver {
*/
public function from($from)
{
- foreach ((array)$from as $val)
+ foreach ((array) $from as $val)
{
if (strpos($val, ',') !== FALSE)
{
@@ -1647,7 +1647,7 @@ class CI_DB_active_record extends CI_DB_driver {
if (strpos($table, " ") !== FALSE)
{
// if the alias is written with the AS keyword, remove it
- $table = preg_replace('/ AS /i', ' ', $table);
+ $table = preg_replace('/\s+AS\s+/i', ' ', $table);
// Grab the alias
$table = trim(strrchr($table, " "));