Skip to content

Commit

Permalink
Use [] for array offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Dec 1, 2019
1 parent f005b0f commit 748cdd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/php/peer/http/HttpProxy.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HttpProxy {
*/
public function __construct($host, $port= 8080, $excludes= []) {
if (null === $port) {
if ('[' === $host{0}) {
if ('[' === $host[0]) {
$parsed= sscanf($host, '[%[^]]]:%d', $addr, $this->port);
$this->host= '['.$addr.']';
} else {
Expand Down

0 comments on commit 748cdd0

Please sign in to comment.