Skip to content

Commit c29efa0

Browse files
tobz-nzArturMoczulski
authored andcommitted
Also check if no level is set at all.
1 parent a661a70 commit c29efa0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/RollbarServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ public function register()
9090
*/
9191
public function stop()
9292
{
93-
$level = strtolower(getenv('ROLLBAR_LEVEL'));
93+
$level = getenv('ROLLBAR_LEVEL') ?: $this->app['config']->get('services.rollbar.level', null);
94+
$hasLevel = empty($level) === false || strtolower($level) == 'none';
9495
$hasToken = !empty(getenv('ROLLBAR_TOKEN'));
9596
$hasConfig = $this->app['config']->has('services.rollbar');
9697

97-
return $level == 'none' || $hasToken === false && $hasConfig === false;
98+
return $hasLevel === false || $hasToken === false && $hasConfig === false;
9899
}
99100
}

0 commit comments

Comments
 (0)