mirror of
https://github.com/getgrav/grav.git
synced 2026-02-07 15:20:21 +01:00
Fix setting port
This commit is contained in:
@@ -184,7 +184,7 @@ class Uri
|
||||
$params = parse_url($url);
|
||||
|
||||
$this->name = $params['host'];
|
||||
$this->port = isset($params['port']) ? $params['port'] : '';
|
||||
$this->port = isset($params['port']) ? $params['port'] : '80';
|
||||
|
||||
$this->uri = $params['path'];
|
||||
if (isset($params['query'])) {
|
||||
|
||||
@@ -69,7 +69,7 @@ class UriTest extends \Codeception\TestCase\Test
|
||||
$this->assertTrue($uri->port() == '80');
|
||||
|
||||
$uri->initializeWithURL('http://localhost/grav/it/ueper?test=x')->init();
|
||||
$this->assertTrue($uri->port() == '');
|
||||
$this->assertTrue($uri->port() == '80');
|
||||
|
||||
$uri->initializeWithURL('http://localhost:8080/grav/it/ueper')->init();
|
||||
$this->assertTrue($uri->params() == null);
|
||||
|
||||
Reference in New Issue
Block a user