Commit 2ab19cbe authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Fix the event framework to pass through artefact objects

parent 132b7a76
......@@ -661,11 +661,13 @@ function handle_event($event, $data) {
throw new Exception("Invalid event");
}
if (is_object($data)) {
if ($data instanceof ArtefactType) {
// leave it alone
}
else if (is_object($data)) {
$data = (array)$data;
}
if (is_numeric($data)) {
else if (is_numeric($data)) {
$data = array('id' => $data);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment