From 7c50d38076090c5e138b750885b0c473473daf18 Mon Sep 17 00:00:00 2001 From: Jens Segers Date: Fri, 2 May 2014 17:42:52 +0200 Subject: [PATCH] Small tweak --- src/RollbarServiceProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/RollbarServiceProvider.php b/src/RollbarServiceProvider.php index 30c8bb5..765f946 100644 --- a/src/RollbarServiceProvider.php +++ b/src/RollbarServiceProvider.php @@ -52,7 +52,10 @@ public function register() \Rollbar::$instance = $instance; // Flush Rollbar on shutdown - register_shutdown_function(array($instance, 'flush')); + if ($instance->batched) + { + register_shutdown_function(array($instance, 'flush')); + } return $instance; });