Changeset 47808 for trunk/src/wp-includes/class-wp-http-cookie.php
- Timestamp:
- 05/16/2020 06:40:52 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-http-cookie.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http-cookie.php
r47617 r47808 100 100 } 101 101 $this->path = isset( $arrURL['path'] ) ? $arrURL['path'] : '/'; 102 if ( '/' != substr( $this->path, -1 ) ) {102 if ( '/' !== substr( $this->path, -1 ) ) { 103 103 $this->path = dirname( $this->path ) . '/'; 104 104 } … … 128 128 list( $key, $val ) = strpos( $pair, '=' ) ? explode( '=', $pair ) : array( $pair, '' ); 129 129 $key = strtolower( trim( $key ) ); 130 if ( 'expires' == $key ) {130 if ( 'expires' === $key ) { 131 131 $val = strtotime( $val ); 132 132 } … … 175 175 // Get details on the URL we're thinking about sending to. 176 176 $url = parse_url( $url ); 177 $url['port'] = isset( $url['port'] ) ? $url['port'] : ( 'https' == $url['scheme'] ? 443 : 80 );177 $url['port'] = isset( $url['port'] ) ? $url['port'] : ( 'https' === $url['scheme'] ? 443 : 80 ); 178 178 $url['path'] = isset( $url['path'] ) ? $url['path'] : '/'; 179 179 … … 187 187 188 188 // Host - very basic check that the request URL ends with the domain restriction (minus leading dot). 189 $domain = substr( $domain, 0, 1 ) == '.'? substr( $domain, 1 ) : $domain;189 $domain = ( '.' === substr( $domain, 0, 1 ) ) ? substr( $domain, 1 ) : $domain; 190 190 if ( substr( $url['host'], -strlen( $domain ) ) != $domain ) { 191 191 return false;
Note: See TracChangeset
for help on using the changeset viewer.