Skip to content

Commit

Permalink
External Libraries: Fix PHP 7.4 compatibility issue in the Requests l…
Browse files Browse the repository at this point in the history
…ibrary.

Moves WordPress/Requests#370 into WordPress.

Previous [46258].

See #47746.


git-svn-id: https://develop.svn.wordpress.org/trunk@46416 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
aaronjorbin committed Oct 6, 2019
1 parent a59b9dd commit 2215a9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wp-includes/Requests/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ protected function normalize_attribute($name, $value) {
return $expiry_time;

case 'domain':
// Domains are not required as per RFC 6265 section 5.2.3
if (empty($value)) {
return null;
}

// Domain normalization, as per RFC 6265 section 5.2.3
if ($value[0] === '.') {
$value = substr($value, 1);
Expand Down

0 comments on commit 2215a9b

Please sign in to comment.