Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emitter is always defined and it should stop script execution after e… #2

Merged
merged 1 commit into from
Jun 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,13 @@ public function match($pattern, $callable = null)
);
}

if ($this->emitter) {
// cannot do anything about it
$this->emitter->emit($this->response);
}

// no emitter (is that possible at all ?)
return $ret;
// emit response and exit
$this->emitter->emit($this->response);
exit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was a reason why "exit" wasn't here. I'm OK to add it for now but may need to remove in the future if i remember.

}

// @todo Should we also stop script execution if no response is received or just ignore that?
//exit;
}

/**
Expand Down