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

t3lib/class.t3lib_div.php

index 7a22896..11de7e2 100755 (executable)
@@ -1463,15 +1463,13 @@ class t3lib_div {
                                        $new_array[] = $value;
                                }
                        }
+                               // direct return for perfomance reasons
                        return $new_array;
-               } else {
-                       foreach($array as $key => &$value) {
-                               $value = trim($value);
-                       }
-                       return $array;
                }
-                       // never reached
-               return array();
+               foreach($array as $key => &$value) {
+                       $value = trim($value);
+               }
+               return $array;
        }
 
        /**