@diosmosis opened this Issue on October 21st 2014 Member

For better testability and so we don't have to use HTTP requests to test the tracker, exit & die should not be called from within core/Tracker.php. These calls should be moved to users of core/Tracker.php, which I believe is just core/piwik.php.

@mnapoli commented on October 21st 2014 Member

:+1:

@tsteur commented on October 21st 2014 Owner

FYI: Without having a look we might still have to call exit in case of a redirect or at least make sure the script ends after setting the location header. Otherwise :+1:

@diosmosis commented on October 21st 2014 Member

@tsteur I think in such case we can throw an exception and catch in piwik.php?

@tsteur commented on October 21st 2014 Owner

Not sure if such a good idea. Just had a look it uses Url::redirectToUrl() anyway so there is no need to exit in Tracker.php anyway.

@mattab commented on December 1st 2014 Owner

This will likely be fixed as part of refactoring in #6075

@tsteur commented on December 1st 2014 Owner

Yes, there should be no exit anymore apart from redirectToUrl which triggers an exception on cli (phpunit)

@mattab commented on December 2nd 2014 Owner

:+1:

This Issue was closed on December 2nd 2014
Powered by GitHub Issue Mirror