Added feature #15534: t3lib_div::view_array: Improve rendering of objects (Thanks...
authorSteffen Gebert <steffen.gebert@typo3.org>
Mon, 23 Aug 2010 20:49:38 +0000 (20:49 +0000)
committerSteffen Gebert <steffen.gebert@typo3.org>
Mon, 23 Aug 2010 20:49:38 +0000 (20:49 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8651 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index fc413ce..ebc2450 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-23 Steffen Gebert  <steffen@steffen-gebert.de>
+
+       * Added feature #15534: t3lib_div::view_array: Improve rendering of objects (Thanks to Stefan Galinski)
+
 2010-08-23 Steffen Kamper  <steffen@typo3.org>
 
        * Updated sysexts version numbers and md5 values
index 31e31be..1d24dd3 100644 (file)
@@ -3571,10 +3571,12 @@ final class t3lib_div {
                                                <td>';
                                        if (is_array($val))     {
                                                $result.=self::view_array($val);
-                                       } elseif (is_object($val))      {
-                                               $string = get_class($val);
-                                               if (method_exists($val, '__toString'))  {
-                                                       $string .= ': '.(string)$val;
+                                       } elseif (is_object($val)) {
+                                               $string = '';
+                                               if (method_exists($val, '__toString')) {
+                                                       $string .= get_class($val) . ': ' . (string) $val;
+                                               } else {
+                                                       $string .= print_r($val, TRUE);
                                                }
                                                $result .= '<font face="Verdana,Arial" size="1" color="red">'.nl2br(htmlspecialchars($string)).'<br /></font>';
                                        } else  {