Skip to content

Commit 3ab6908

Browse files
committed
If port is not defined, default to 80
1 parent ad2d079 commit 3ab6908

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: DependencyInjection/OlaRabbitMqAdminToolkitExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private function loadConnections(array $connections, ContainerBuilder $container
5050

5151
$definition = new Definition('RabbitMq\ManagementApi\Client', array(
5252
null,
53-
sprintf("%s://%s:%s", $parsedUri['scheme'], $parsedUri['host'], $parsedUri['port']),
53+
sprintf("%s://%s:%s", $parsedUri['scheme'], $parsedUri['host'], isset($parsedUri['port']) ? $parsedUri['port'] : 80),
5454
$parsedUri['user'],
5555
$parsedUri['pass']
5656
));

Diff for: Tests/DependencyInjection/OlaRabbitMqAdminToolkitExtensionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function test_load_successfull()
1919
$this->load(array(
2020
'delete_allowed' => true,
2121
'connections' => array(
22-
'default' => 'http://user:password@localhost:15672',
22+
'default' => 'http://user:password@localhost',
2323
),
2424
'vhosts' => array(
2525
'test' => array(

0 commit comments

Comments
 (0)