Remove unnecessary foreach-indexes from trimExpode()
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Mon, 10 Sep 2007 20:17:57 +0000 (20:17 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Mon, 10 Sep 2007 20:17:57 +0000 (20:17 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2503 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_div.php

index 11de7e2..e7c1301 100755 (executable)
@@ -1457,7 +1457,7 @@ class t3lib_div {
                        //  b) avoid unnecessary code when $onlyNonEmptyValues is not set
                if ($onlyNonEmptyValues) {
                        $new_array = array();
-                       foreach($array as $index => $value) {
+                       foreach($array as $value) {
                                $value = trim($value);
                                if ($value != '') {
                                        $new_array[] = $value;
@@ -1466,7 +1466,7 @@ class t3lib_div {
                                // direct return for perfomance reasons
                        return $new_array;
                }
-               foreach($array as $key => &$value) {
+               foreach($array as &$value) {
                        $value = trim($value);
                }
                return $array;