TYPO3 Exception 1376683066

The slot method "..." returned a different number (...) of arguments, than it received (...).

This happens if a signal slot method is wrongly used.

Example

The signal is called with a parameter [$csvRow]:

$this->signalSlotDispatcher->dispatch(__CLASS__, 'beforeSetCsvRow', [$csvRow]);
Copied!

However the according slot method returns only $csvRow

class DatabaseRecordListSlots
{
  public function addValuesToCsvRow($csvRow)
  {
    $csvRow['new'] = 128;
    return $csvRow;
  }
}
Copied!

The slot must return the same array of arguments as the dispatcher signal has used before.

class DatabaseRecordListSlots
{
  public function addValuesToCsvRow($csvRow)
  {
    $csvRow['new'] = 128;
    return [$csvRow];
  }
}
Copied!