Project

General

Profile

Bug #98630

Updated by Ralph Brugger about 2 years ago

PHP Warning: Undefined array key foobar in typo3_src-11.5.17/typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php line 1394 

 <pre><code class="php"> 
     public function pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet = 'sDEF', $lang = 'lDEF', $value = 'vDEF') 
     { 
         $sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$lang] : ''; 

 </code></pre> 

 The warning occures when the stored flexform data doesn't contain a flexform sheet ($sheet) that has been added to a flexform but the record is outdated. 

 Solution could be? 

 <pre><code class="php"> 
 public function pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet = 'sDEF', $lang = 'lDEF', $value = 'vDEF') 
 { 

     if (isset($T3FlexForm_array['data'][$sheet])){ 
      
       $sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$lang] : ''; 
       if (is_array($sheetArray)) { 
           return $this->pi_getFFvalueFromSheetArray($sheetArray, explode('/', $fieldName), $value); 
       } 
     } 
     return null; 
 } 

 </code></pre> 


Back