Skip to content

Commit 9356a85

Browse files
committed
Fix undefined index: controllers_base_namespace
1 parent 5a7fdb4 commit 9356a85

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Fix for potential `Undefined index: controllers_base_namespace.` notice
6+
57
## 2.1.0
68

79
- Added a option (`controllers_base_namespace`) to strip away the controller base namespace for cleaner transaction names (#393)

src/Sentry/Laravel/ServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ protected function configureAndRegisterClient(): void
108108
{
109109
$userConfig = $this->getUserConfig();
110110

111-
Integration::setControllersBaseNamespace($userConfig['controllers_base_namespace']);
111+
if (isset($userConfig['controllers_base_namespace'])) {
112+
Integration::setControllersBaseNamespace($userConfig['controllers_base_namespace']);
113+
}
112114

113115
$this->app->bind(ClientBuilderInterface::class, function () {
114116
$basePath = base_path();

0 commit comments

Comments
 (0)