diff --git a/lib/Raven/Client.php b/lib/Raven/Client.php index 2f39949c3..058360159 100644 --- a/lib/Raven/Client.php +++ b/lib/Raven/Client.php @@ -269,9 +269,8 @@ public function install() $this->error_handler->registerErrorHandler(); $this->error_handler->registerShutdownFunction(); - if ($this->_curl_handler) { - $this->_curl_handler->registerShutdownFunction(); - } + // Register final shutdown function to send fatal error via curl async. + $this->registerShutdownFunction(); return $this; } @@ -742,12 +741,10 @@ protected function registerDefaultBreadcrumbHandlers() $handler->install(); } - protected function registerShutdownFunction() + public function registerShutdownFunction() { - if (!$this->_shutdown_function_has_been_set) { - $this->_shutdown_function_has_been_set = true; - register_shutdown_function(array($this, 'onShutdown')); - } + $this->_shutdown_function_has_been_set = true; + register_shutdown_function(array($this, 'onShutdown')); } /**