[+BUGFIX] allow skipping of arguments in signal dispatch
authorFelix Oertel <f@oer.tel>
Sat, 9 Jul 2011 13:00:50 +0000 (15:00 +0200)
committerFelix Oertel <f@oer.tel>
Sat, 9 Jul 2011 13:33:07 +0000 (15:33 +0200)
The SignalSlotDispatcher requires an array of arguments when dispatching a signal.
It should be perfectly fine to call it without.

Change-Id: Ifb8633ce9c62a545b2fabe6ed265e3749f5e8545

typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php

index 3b732de..b54da88 100644 (file)
@@ -109,7 +109,7 @@ class Tx_Extbase_SignalSlot_Dispatcher {
         * @author Robert Lemke <robert@typo3.org>
         * @api
         */
-       public function dispatch($signalClassName, $signalName, array $signalArguments) {
+       public function dispatch($signalClassName, $signalName, array $signalArguments = array()) {
                if (!isset($this->slots[$signalClassName][$signalName])) return;
                foreach ($this->slots[$signalClassName][$signalName] as $slotInformation) {
                        if (isset($slotInformation['object'])) {