Skip to content
Browse files

Ignore port 80 on HTTP URL and 443 on HTTPS URL in WordPressHTTPS_Url…

… object.
  • Loading branch information...
1 parent b195144 commit 71ae8b9ac1d8b3a932919747884b3bb14968ee99 @mvied committed Feb 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/WordPressHTTPS/Url.php
View
2 lib/WordPressHTTPS/Url.php
@@ -519,7 +519,7 @@ public function toString() {
$string = ( $this->getScheme() ? $this->getScheme() . '://' : '' ) .
( $this->getUser() ? $this->getUser() . ( $this->getPass() ? ':' . $this->getPass() : '' ) . '@' : '' ) .
$this->getHost() .
- ( $this->getPort() ? ':' . $this->getPort() : '' ) .
+ ( $this->getPort() && ( ( $this->getPort() != 80 && $this->getScheme() == 'http' ) || ( $this->getPort() != 443 && $this->getScheme() == 'https' ) ) ? ':' . $this->getPort() : '' ) .
$this->getPath() .
( $this->getQuery() ? '?' . $this->getQuery() : '' ) .
( $this->getFragment() ? '#' . $this->getFragment() : '' );

0 comments on commit 71ae8b9

Please sign in to comment.
Something went wrong with that request. Please try again.