You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/bref/src/Runtime.php
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,11 @@ public function getRunner(?object $application): RunnerInterface
40
40
}
41
41
42
42
if ($applicationinstanceof ContainerInterface) {
43
-
$handler = getenv('_HANDLER');
44
-
// TODO error checking
45
-
[$script, $service] = explode(':', $handler);
46
-
$application = $application->get($service);
43
+
$handler = explode(':', $_SERVER['_HANDLER']);
44
+
if (!isset($handler[1]) || '' === $handler[1]) {
45
+
thrownew \RuntimeException(sprintf('Application is instance of ContainerInterface but the handler does not contain a service. The handler must be on format "path/to/file.php:App\\Lambda\\MyHandler". You provided "%s".', $_SERVER['_HANDLER']));
0 commit comments