Fixed bug #12078: Scheduler: Check if additional fields indeed provide fields
authorFrancois Suter <francois.suter@typo3.org>
Fri, 9 Oct 2009 07:23:40 +0000 (07:23 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Fri, 9 Oct 2009 07:23:40 +0000 (07:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6123 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/scheduler/mod1/index.php

index c23a131..7636e4b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-09  Francois Suter  <francois@typo3.org>
+
+       * Fixed bug #12078: Scheduler: Check if additional fields indeed provide fields
+
 2009-10-09  Kasper Sk\8crh¿j <kasper@typo3.org>
        * Tiny bug with date function in t3lib_befunc. Casted timestamp to integer.
        * Added User TSconfig option "options.checkPageLanguageOverlay" so flexforms only show language fields for languages available on the page.
index c904776..5715a21 100755 (executable)
@@ -743,15 +743,18 @@ class tx_scheduler_Module extends t3lib_SCbase {
                                $additionalFieldsStyle = ' style="display: none"';
                        }
 
-                       foreach ($fields as $fieldID => $fieldInfo) {
-                               $table[$tr][] = t3lib_BEfunc::cshItem($fieldInfo['cshKey'], $fieldInfo['cshLabel'], $this->backPath, '|', false, 'margin-bottom:0px;');
-                               $table[$tr][] = '<label for="' . $fieldID . '">' . $GLOBALS['LANG']->sL($fieldInfo['label']) . '</label>';
-                               $table[$tr][] = $fieldInfo['code'];
-                               $tableLayout[$tr] = array (
-                                       'tr'     => array('<tr id="' . $fieldID . '_row"' . $additionalFieldsStyle .' class="extraFields extra_fields_' . $class . '">', '</tr>'),
-                                       'defCol' => $defaultCell
-                               );
-                               $tr++;
+                               // Add each field to the display, if there are indeed any
+                       if (isset($fields) && is_array($fields)) {
+                               foreach ($fields as $fieldID => $fieldInfo) {
+                                       $table[$tr][] = t3lib_BEfunc::cshItem($fieldInfo['cshKey'], $fieldInfo['cshLabel'], $this->backPath, '|', false, 'margin-bottom:0px;');
+                                       $table[$tr][] = '<label for="' . $fieldID . '">' . $GLOBALS['LANG']->sL($fieldInfo['label']) . '</label>';
+                                       $table[$tr][] = $fieldInfo['code'];
+                                       $tableLayout[$tr] = array (
+                                               'tr'     => array('<tr id="' . $fieldID . '_row"' . $additionalFieldsStyle .' class="extraFields extra_fields_' . $class . '">', '</tr>'),
+                                               'defCol' => $defaultCell
+                                       );
+                                       $tr++;
+                               }
                        }
                }