Skip to content

Commit 70b7e5b

Browse files
committed
Fixed $new_url reference
1 parent a5f82e8 commit 70b7e5b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/http_build_url.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ function http_build_url($url, $parts = array(), $flags = HTTP_URL_REPLACE, &$new
160160
$parsed_string .= '#' . $url['fragment'];
161161
}
162162

163+
$new_url = $url;
164+
163165
return $parsed_string;
164166
}
165167
}

tests/HttpBuildUrlTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ public function testDefaults()
5050
$this->assertSame($expected, $actual);
5151
}
5252

53+
public function testNewUrl()
54+
{
55+
$expected = parse_url($this->full_url);
56+
http_build_url($this->full_url, null, null, $actual);
57+
58+
$this->assertEquals($expected, $actual);
59+
}
60+
5361
/**
5462
* @dataProvider queryProvider
5563
*/

0 commit comments

Comments
 (0)