Merge pull request #1948 from GDmac/develop

Fix #1946 dbforge add_key
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index d2d99cc..f46237e 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -182,7 +182,7 @@
 	 */
 	public function add_key($key = '', $primary = FALSE)
 	{
-		if (is_array($key))
+		if ($primary && is_array($key))
 		{
 			foreach ($key as $one)
 			{