Bug #3196: PHP warnings in class.t3lib_tceforms.php
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 18 Apr 2006 18:39:47 +0000 (18:39 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 18 Apr 2006 18:39:47 +0000 (18:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1441 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php

index 8309475..27129fc 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-04-18  Dmitry Dulepov <typo3@accio.lv>
+
+       * Fixed bug #3196: PHP warnings in class.t3lib_tceforms.php
+
 2006-04-14   Rupert Germann  <rupi@gmx.li>
 
        * fix for the fix from bug 2868: the adminpanel didn't transfer the page id correctly when realUrl was used
index 8c7f6c7..e7a040b 100755 (executable)
@@ -2027,10 +2027,9 @@ class t3lib_TCEforms     {
 
                        // Data Structure:
                $dataStructArray = t3lib_BEfunc::getFlexFormDS($PA['fieldConf']['config'],$row,$table);
-#debug($dataStructArray);
+
                        // Get data structure:
                if (is_array($dataStructArray)) {
-#debug(array(str_replace(' ',chr(160),$PA['itemFormElValue'])));
 
                                // Get data:
                        $xmlData = $PA['itemFormElValue'];
@@ -2042,19 +2041,19 @@ class t3lib_TCEforms    {
                        }
                        $editData=t3lib_div::xml2array($xmlData);
                        if (!is_array($editData))       {       // Must be XML parsing error...
-#debug(array($editData,$xmlData));
                                $editData=array();
                        }
+                       else if (isset($editData['meta']) && !is_array($editData['meta'])) {
+                           $editData['meta'] = array();
+                       }
 
                                // Find the data structure if sheets are found:
                        $sheet = $editData['meta']['currentSheetId'] ? $editData['meta']['currentSheetId'] : 'sDEF';    // Sheet to display
-#                      $item.= '<input type="hidden" name="'.$PA['itemFormElName'].'[meta][currentSheetId]" value="'.$sheet.'">';
 
                                // Create sheet menu:
-                       if (is_array($dataStructArray['sheets']))       {
-                               #$item.=$this->getSingleField_typeFlex_sheetMenu($dataStructArray['sheets'], $PA['itemFormElName'].'[meta][currentSheetId]', $sheet).'<br />';
-                       }
-#debug($editData);
+//                     if (is_array($dataStructArray['sheets']))       {
+//                             #$item.=$this->getSingleField_typeFlex_sheetMenu($dataStructArray['sheets'], $PA['itemFormElName'].'[meta][currentSheetId]', $sheet).'<br />';
+//                     }
 
                                // Create language menu:
                        $langChildren = $dataStructArray['meta']['langChildren'] ? 1 : 0;