Don't use each()

Will be deprecated in PHP 7.2
diff --git a/system/core/Security.php b/system/core/Security.php
index bacbb78..082ffa9 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -354,9 +354,9 @@
 		// Is the string an array?
 		if (is_array($str))
 		{
-			while (list($key) = each($str))
+			foreach ($str as $key => &$value)
 			{
-				$str[$key] = $this->xss_clean($str[$key]);
+				$str[$key] = $this->xss_clean($value);
 			}
 
 			return $str;