[EventDispatcher] Merged and resolved conflicts in #3900 #3901

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+5 −2
Split
@@ -117,7 +117,7 @@ public function addSubscriber(EventSubscriberInterface $subscriber)
if (is_string($params)) {
$this->addListener($eventName, array($subscriber, $params));
} else {
- $this->addListener($eventName, array($subscriber, $params[0]), $params[1]);
+ $this->addListener($eventName, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0);
}
}
}
@@ -241,6 +241,9 @@ class TestEventSubscriberWithPriorities implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
- return array('pre.foo' => array('preFoo', 10));
+ return array(
+ 'pre.foo' => array('preFoo', 10),
+ 'post.foo' => array('postFoo'),
+ );
}
}