[BUGFIX] Error when opening TYPO3 manual
authorMarkus Klein <klein.t3@mfc-linz.at>
Sun, 24 Jul 2011 19:17:17 +0000 (21:17 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 31 Jul 2011 15:23:46 +0000 (17:23 +0200)
A missing parameter for SC_view_help::render_Table() causes
TYPO3 manual to produce a PHP warning.
This patch makes the second parameter optional.

Change-Id: I5aee7ea455ac37c7f287b9f5bd96d6bef22b83e8
Resolves: #28330
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/3705
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/view_help.php

index 199f5ae..5c07d5a 100644 (file)
@@ -457,11 +457,16 @@ class SC_view_help {
         * @param string $table CSH key / table name
         * @return string HTML output
         */
-       function render_Table($key, $table) {
+       function render_Table($key, $table = NULL) {
                global $BE_USER,$TCA_DESCR,$TCA,$LANG;
 
                $output = '';
 
+                       // take default key if not explicitly specified
+               if ($table === NULL) {
+                       $table = $key;
+               }
+
                        // Load table TCA
                t3lib_div::loadTCA($key);