Skip to content

Commit

Permalink
If port is not defined, default to 80
Browse files Browse the repository at this point in the history
  • Loading branch information
olaurendeau committed Oct 10, 2016
1 parent ad2d079 commit 3ab6908
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/OlaRabbitMqAdminToolkitExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private function loadConnections(array $connections, ContainerBuilder $container

$definition = new Definition('RabbitMq\ManagementApi\Client', array(
null,
sprintf("%s://%s:%s", $parsedUri['scheme'], $parsedUri['host'], $parsedUri['port']),
sprintf("%s://%s:%s", $parsedUri['scheme'], $parsedUri['host'], isset($parsedUri['port']) ? $parsedUri['port'] : 80),
$parsedUri['user'],
$parsedUri['pass']
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function test_load_successfull()
$this->load(array(
'delete_allowed' => true,
'connections' => array(
'default' => 'http://user:password@localhost:15672',
'default' => 'http://user:password@localhost',
),
'vhosts' => array(
'test' => array(
Expand Down

0 comments on commit 3ab6908

Please sign in to comment.