Skip to content

Commit d170386

Browse files
committed
Merge pull request #12 from weotch/patch-1
Check if there is a current route defined before getting the action
2 parents 65f03be + 619b5ee commit d170386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Intouch/LaravelNewrelic/LaravelNewrelicServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function getTransactionName( $request, $response, $app )
107107
$router = $app['router'];
108108

109109
$name = $router->currentRouteName()
110-
?: $router->currentRouteAction()
110+
?: $router->current() && $router->currentRouteAction()
111111
?: $request->getMethod() . ' ' . $request->getPathInfo();
112112
}
113113

0 commit comments

Comments
 (0)