[BUGFIX] Error when opening TYPO3 manual
authorMarkus Klein <klein.t3@mfc-linz.at>
Sun, 24 Jul 2011 19:12:26 +0000 (21:12 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 31 Jul 2011 15:22:51 +0000 (17:22 +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: I2b3e2cf45d4b7b411e7e7b007c7650df0bd79ea8
Resolves: #28330
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/3704
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/view_help.php

index 4cf50a2..11dd045 100644 (file)
@@ -409,9 +409,14 @@ 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) {
                $output = '';
 
+                       // take default key if not explicitly specified
+               if ($table === NULL) {
+                       $table = $key;
+               }
+
                        // Load table TCA
                t3lib_div::loadTCA($key);