Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 2674) +++ t3lib/class.t3lib_div.php (working copy) @@ -2853,23 +2853,35 @@ function view_array($array_in) { if (is_array($array_in)) { $result='
'.htmlspecialchars("EMPTY!").' | |
'.htmlspecialchars((string)$key).' | ';
- if (is_array($array_in[$key])) {
- $result.=t3lib_div::view_array($array_in[$key]);
- } elseif (is_object($array_in[$key])) {
- $result.= '[Object '.get_class($array_in[$key]).']';
- } else {
- $result.= ''.nl2br(htmlspecialchars((string)$val)).' '; + if (count($array_in) == 0) { + $result.= ' |
EMPTY! | |
'.htmlspecialchars((string)$key).' | ';
+ if (is_array($val)) {
+ $result.=t3lib_div::view_array($val);
+ } elseif (is_object($val)) {
+ $string = get_class($val);
+ if (method_exists($val, '__toString')) {
+ $string .= ': '.(string)$val;
+ }
+ $result .= ''.nl2br(htmlspecialchars($string)).' '; + } else { + if (gettype($val) == 'object') { + $string = 'Unknown object'; + } else { + $string = (string)$val; + } + $result.= ''.nl2br(htmlspecialchars($string)).' '; + } + $result.= ' |
'.nl2br(htmlspecialchars((string)$array_in)).' |
+ '.nl2br(htmlspecialchars((string)$array_in)).' |