[TYPO3-bugs]  Bug in IRRE
    Sascha Egerer 
    seg at softvision.de
       
    Sun Nov 16 12:11:51 CET 2008
    
    
  
Hi!
I've found a bug in the IRRE-Core and will post it in the bugtracker when it 
is available again.
In class.t3lib_tceforms_inline.php on line 225 and 226 the first and the 
last Element is saved in $config['inline']['first'] and 
$config['inline']['last'].
But the indexes of the array $relatedRecords['records'] are the uid's of the 
records.
So these lines do not return the expected values
   // set the first and last record to the config array
 $config['inline']['first'] = $relatedRecords['records'][0]['uid'];
 $config['inline']['last'] = 
$relatedRecords['records'][$relatedRecords['count']-1]['uid'];
Theses Lines should be changed to
   // set the first and last record to the config array
   // first safe the values in an array with numerical indexes
  $resorted_records = array_values($relatedRecords['records']);
  $config['inline']['first'] = $resorted_records[0]['uid'];
  $config['inline']['last'] = 
$resorted_records[$relatedRecords['count']-1]['uid'];
Patch file attached.
Greets
Sascha Egerer
    
    
More information about the TYPO3-team-bugs
mailing list