Skip to content

Commit 7630fbe

Browse files
committed
Merge pull request #18 from digitalkaoz/patch-1
fixed some bugs
2 parents 4be2e22 + 2291c50 commit 7630fbe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Command/ListenersCommand.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,9 @@ protected function outputListeners(OutputInterface $output, $listenersIds, $opti
184184
if (is_array($event) && is_array($event[0])) {
185185
foreach ($event as $property) {
186186
$priority = 0;
187-
$method = $property;
187+
$method = $property[0];
188188
if (is_array($property) && isset($property[1]) && is_int($property[1])) {
189189
$priority = $property[1];
190-
$method = $property[0];
191190
}
192191

193192
$listenersList[] = array(
@@ -205,6 +204,10 @@ protected function outputListeners(OutputInterface $output, $listenersIds, $opti
205204
if (is_array($event) && isset($event[1]) && is_int($event[1])) {
206205
$priority = $event[1];
207206
}
207+
208+
if (!is_array($event)) {
209+
$event = array($event);
210+
}
208211
$listenersList[] = array(
209212
$serviceId,
210213
$name,
@@ -229,7 +232,7 @@ protected function outputListeners(OutputInterface $output, $listenersIds, $opti
229232
$listenersList[] = array(
230233
$serviceId,
231234
'n/a',
232-
'',
235+
0,
233236
sprintf('<comment>alias for</comment> <info>%s</info>', (string) $definition),
234237
$definition->getClass()
235238
);

0 commit comments

Comments
 (0)