Skip to content

Commit

Permalink
Allow Null Broadcast Connection Driver
Browse files Browse the repository at this point in the history
  • Loading branch information
ahinkle committed Jan 11, 2019
1 parent 348c447 commit 6d42c21
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Illuminate/Broadcasting/BroadcastManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ protected function resolve($name)
{
$config = $this->getConfig($name);

if (is_null($config)) {
throw new InvalidArgumentException("Broadcaster [{$name}] is not defined.");
}

if (isset($this->customCreators[$config['driver']])) {
return $this->callCustomCreator($config);
}
Expand Down Expand Up @@ -269,7 +265,11 @@ protected function createNullDriver(array $config)
*/
protected function getConfig($name)
{
return $this->app['config']["broadcasting.connections.{$name}"];
if (! is_null($name) && $name !== 'null') {
return $this->app['config']["broadcasting.connections.{$name}"];
}

return ['driver' => 'null'];
}

/**
Expand Down

0 comments on commit 6d42c21

Please sign in to comment.