[BUGFIX] Ensure $output is used as string
authorPeter Niederlag <netservice@niekom.de>
Tue, 17 Apr 2012 07:26:22 +0000 (09:26 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 28 Jun 2012 19:44:01 +0000 (21:44 +0200)
Problem was introduced by new API t3lib_befunc::helpTextArray()
which changed ::helpText()

Change-Id: Idc055446333bfaec008944e41b434e844fcbd241
Fixes: #36194
Relates: #23798
Releases: 4.5, 4.6, 4.7, 6.0
Reviewed-on: http://review.typo3.org/12082
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/class.t3lib_befunc.php

index 50c8010..b2291ae 100644 (file)
@@ -2739,22 +2739,19 @@ final class t3lib_BEfunc {
                $helpTextArray = self::helpTextArray($table, $field);
 
                $output = '';
+               $arrow = '';
 
-                       // put header before the rest of the text
+                       // Put header before the rest of the text
                if ($helpTextArray['title'] !== NULL) {
                        $output .= '<h2 class="t3-row-header">' . $helpTextArray['title'] . '</h2>';
                }
-                       // add the content
-               if ($helpTextArray['description'] !== NULL) {
-                       $output .= $helpTextArray['description'];
-               }
-                       // add see also arrow if we have more info
+                       // Add see also arrow if we have more info
                if ($helpTextArray['moreInfo']) {
                        $arrow = t3lib_iconWorks::getSpriteIcon('actions-view-go-forward');
                }
-                       // add description text
-               if ($helpTextArray['description'] || $arrow) {
-                       $output['description'] = '<p class="t3-help-short">' . nl2br(htmlspecialchars($helpTextArray['description'])) . $arrow . '</p>';
+                       // Wrap description and arrow in p tag
+               if ($helpTextArray['description'] !== NULL || $arrow) {
+                       $output .= '<p class="t3-help-short">' . nl2br(htmlspecialchars($helpTextArray['description'])) . $arrow . '</p>';
                }
 
                return $output;