Permalink
Browse files

remove some unecessary finish() calls

  • Loading branch information...
flack committed Feb 1, 2019
1 parent 0fa7a80 commit 916d016fc585d23938e8b49672bd73e053fe11ba
@@ -59,7 +59,8 @@ public function handle_exception($e)
if (PHP_SAPI !== 'cli') {
$this->show($httpcode, $message);
// This will exit
debug_add("Error Page output finished, exiting now");
return;
}
throw $e;
}
@@ -146,10 +147,6 @@ public function show($httpcode, $message)
if (!$style->show_midcom('midcom_error_' . $httpcode)) {
$style->show_midcom('midcom_error');
}
debug_add("Error Page output finished, exiting now");
midcom::get()->cache->content->no_cache();
midcom::get()->finish();
}
/**
@@ -66,8 +66,7 @@ class midcom_application
* not show the site's style around the component output. This is mainly
* targeted at XML output like RSS feeds and similar things. The output
* handler of the site, excluding the style-init/-finish tags will be executed
* immediately after the handle phase, and midcom->finish() is called
* automatically afterwards, thus ending the request.
* immediately after the handle phase
*
* Changing this flag after the handle phase or for dynamically loaded
* components won't change anything.
@@ -28,7 +28,5 @@ public function send()
$exporter = new midcom_helper_exporter_json();
echo $exporter->array2data($this->_data);
midcom::get()->finish();
}
}
@@ -29,8 +29,6 @@ public function send()
}
echo "</response>\n";
midcom::get()->finish();
}
private function _render_tag($field, $value)
@@ -17,10 +17,6 @@ public function __construct()
{
// elfinder tmp detection doesn't work on OS X
$this->tmpPath = midcom::get()->config->get('midcom_tempdir');
// elfinder calls exit(), so we need to make sure we write caches
register_shutdown_function(function () {
midcom::get()->finish();
});
}
/**

0 comments on commit 916d016

Please sign in to comment.