Skip to content

Commit

Permalink
Merge pull request #163 from Chris53897/feature/fix-deprecation
Browse files Browse the repository at this point in the history
feat: fix deprecation
  • Loading branch information
dbu committed Mar 16, 2024
2 parents 33555d9 + ddaef02 commit 4cb00d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ parameters:
count: 1
path: src/Cookie.php

-
message: "#^Parameter \\#1 \\$string of function rtrim expects string, string\\|null given\\.$#"
count: 1
path: src/Cookie.php

-
message: "#^Class Http\\\\Message\\\\CookieJar implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#"
count: 1
Expand Down
4 changes: 3 additions & 1 deletion src/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,9 @@ private function normalizeDomain($domain)
*/
private function normalizePath($path)
{
$path = rtrim($path, '/');
if (null !== $path) {
$path = rtrim($path, '/');
}

if (empty($path) or '/' !== substr($path, 0, 1)) {
$path = '/';
Expand Down

0 comments on commit 4cb00d6

Please sign in to comment.