Make t3lib_div::arrayToLogString() accept an empty string as empty list
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Thu, 8 Jun 2006 16:07:56 +0000 (16:07 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Thu, 8 Jun 2006 16:07:56 +0000 (16:07 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1511 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index f92c913..17fd1f7 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
+
+2006-06-08  Martin Kutschker  <martin.t.kutschker@blackbox.net>
+
+       * Make t3lib_div::arrayToLogString() accept an empty string as empty list
+
 2006-06-04  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
-       * unify PHP5 check in config_defaults.php and deprecate $TYPO_VERSION
+       * Unify PHP5 check in config_defaults.php and deprecate $TYPO_VERSION
 
 2006-06-02  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index b9f7867..3abf0e1 100755 (executable)
@@ -4421,10 +4421,11 @@ class t3lib_div {
                $str = '';
                if(is_array($arr)) {
                        if (!is_array($valueList)) {
-                               $valueList = explode(',', $valueList);
+                               $valueList = $valueList = t3lib_div::trimExplode(',', $valueList, 1);
                        }
+                       $valListCnt = count($valueList);
                        foreach($arr as $key => $value) {
-                               if (!count($valueList) OR (count($valueList) AND in_array($key, $valueList))) {
+                               if (!$valListCnt || in_array($key, $valueList)) {
                                        $str .= (string)$key.trim(': '.t3lib_div::fixed_lgd(str_replace("\n",'|',(string)$value), $valueLength)).'; ';
                                }
                        }