- Fixed trivial bug in view_array(): With empty arrays table-end tag were not applied.
authorKasper Skårhøj <kasper@typo3.org>
Thu, 31 Jan 2008 21:11:39 +0000 (21:11 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Thu, 31 Jan 2008 21:11:39 +0000 (21:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2994 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 61c8e57..cc6c14d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2008-01-31  Kasper Sk\8crh¿j <kasper2008@typo3.com>
 
+       * - Fixed trivial bug in view_array(): With empty arrays table-end tag were not applied. (class.t3lib_div)
        * - (trivial) changed arraybrowser so also array keys are included in the search. [class.t3lib_arraybrowser.php + lowlevel/config/index.php]
        
 2008-01-31  Jeff Segars  <jeff@webempoweredchurch.org>
index 2cdaee3..53aa270 100755 (executable)
@@ -2853,12 +2853,15 @@ class t3lib_div {
         */
        function view_array($array_in)  {
                if (is_array($array_in))        {
-                       $result='<table border="1" cellpadding="1" cellspacing="0" bgcolor="white">';
+                       $result='
+                       <table border="1" cellpadding="1" cellspacing="0" bgcolor="white">';
                        if (count($array_in) == 0)      {
                                $result.= '<tr><td><font face="Verdana,Arial" size="1"><b>EMPTY!</b></font></td></tr>';
                        } else  {
                                foreach ($array_in as $key => $val)     {
-                                       $result.= '<tr><td valign="top"><font face="Verdana,Arial" size="1">'.htmlspecialchars((string)$key).'</font></td><td>';
+                                       $result.= '<tr>
+                                               <td valign="top"><font face="Verdana,Arial" size="1">'.htmlspecialchars((string)$key).'</font></td>
+                                               <td>';
                                        if (is_array($val))     {
                                                $result.=t3lib_div::view_array($val);
                                        } elseif (is_object($val))      {
@@ -2875,7 +2878,8 @@ class t3lib_div {
                                                }
                                                $result.= '<font face="Verdana,Arial" size="1" color="red">'.nl2br(htmlspecialchars($string)).'<br /></font>';
                                        }
-                                       $result.= '</td></tr>';
+                                       $result.= '</td>
+                                       </tr>';
                                }
                        }
                        $result.= '</table>';