summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_forge.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 119d78d38..2be2790dd 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -132,7 +132,7 @@ abstract class CI_DB_forge {
*/
public function add_key($key = '', $primary = FALSE)
{
- if (is_array($key))
+ if ($primary && is_array($key))
{
foreach ($key as $one)
{