Remove superfluos is_array() check
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Mon, 7 Apr 2008 13:41:02 +0000 (13:41 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Mon, 7 Apr 2008 13:41:02 +0000 (13:41 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3543 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 52d2250..d357ab6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+
+2008-04-07  Martin Kutschker  <masi@typo3.org>
+
+       * Remove superfluos is_array() check in t3lib_div
+
 2008-04-07  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #8005: Linking across domains does not work with nested domains
index f171154..36a132f 100755 (executable)
@@ -1840,14 +1840,12 @@ final class t3lib_div {
         */
        public static function removeDotsFromTS(array $ts) {
                $out = array();
-               if (is_array($ts)) {
-                       foreach ($ts as $key => $value) {
-                               if (is_array($value)) {
-                                       $key = rtrim($key, '.');
-                                       $out[$key] = t3lib_div::removeDotsFromTS($value);
-                               } else {
-                                       $out[$key] = $value;
-                               }
+               foreach ($ts as $key => $value) {
+                       if (is_array($value)) {
+                               $key = rtrim($key, '.');
+                               $out[$key] = t3lib_div::removeDotsFromTS($value);
+                       } else {
+                               $out[$key] = $value;
                        }
                }
                return $out;
@@ -5030,15 +5028,13 @@ final class t3lib_div {
         */
        public static function arrayToLogString(array $arr, $valueList=array(), $valueLength=20) {
                $str = '';
-               if (is_array($arr))     {
-                       if (!is_array($valueList))      {
-                               $valueList = t3lib_div::trimExplode(',', $valueList, 1);
-                       }
-                       $valListCnt = count($valueList);
-                       foreach ($arr as $key => $value)        {
-                               if (!$valListCnt || in_array($key, $valueList)) {
-                                       $str .= (string)$key.trim(': '.t3lib_div::fixed_lgd(str_replace("\n",'|',(string)$value), $valueLength)).'; ';
-                               }
+               if (!is_array($valueList))      {
+                       $valueList = t3lib_div::trimExplode(',', $valueList, 1);
+               }
+               $valListCnt = count($valueList);
+               foreach ($arr as $key => $value)        {
+                       if (!$valListCnt || in_array($key, $valueList)) {
+                               $str .= (string)$key.trim(': '.t3lib_div::fixed_lgd(str_replace("\n",'|',(string)$value), $valueLength)).'; ';
                        }
                }
                return $str;