File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,13 @@ class Responder
5151 public static function render (Nette \Application \Responses \TextResponse $ response )
5252 {
5353 ob_start ();
54- $ response ->send (new Http \Request (new Http \UrlScript ()), new Http \Response (NULL ));
55- return ob_get_clean ();
54+ try {
55+ $ response ->send (new Http \Request (new Http \UrlScript ()), new Http \Response (NULL ));
56+ return ob_get_clean ();
57+ } catch (\Exception $ e ) {
58+ ob_end_clean ();
59+ throw $ e ;
60+ }
5661 }
5762}
5863
Original file line number Diff line number Diff line change 1414date_default_timezone_set ('Europe/Prague ' );
1515
1616
17+ // output buffer level check
18+ register_shutdown_function (function ($ level ) {
19+ Tester \Assert::same ($ level , ob_get_level ());
20+ }, ob_get_level ());
21+
22+
1723function test (\Closure $ function )
1824{
1925 $ function ();
You can’t perform that action at this time.
0 commit comments