Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Wrongly calling call_user_func with an array in eventmanager #30

Open
thedjnK opened this issue Feb 18, 2016 · 1 comment
Open

Wrongly calling call_user_func with an array in eventmanager #30

thedjnK opened this issue Feb 18, 2016 · 1 comment

Comments

@thedjnK
Copy link

thedjnK commented Feb 18, 2016

There is an issue with this code in the eventmanager:

public function trigger($event, $caller, array $parameters)
...
$callbacks = array_merge($events, $this->events[self::WILDCARD]);
...
do {
$current = array_shift($callbacks);
call_user_func($current, $eventObject);

$current is usually an array which it shouldn't be (PHP Notice: Array to string conversion in /tmp/src/Event/EventManager.php on line 128)

@fabiang
Copy link
Owner

fabiang commented May 23, 2017

Somehow I don't see an Issue here. $callbacks should always be an array and that $current is callable is checked when attaching to an event.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants