Skip to content

Commit

Permalink
Allows removement of items with case sensitive keys
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasfabian committed Sep 27, 2023
1 parent 0c90aeb commit 82db3b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ public function add(...$args): self
*/
public function remove($key)
{
if (isset($this->data[$key])) {
parent::remove($key);
$this->save();
if ($this->caseSensitive !== true) {
$key = strtolower($key);
}
parent::remove($key);
$this->save();
return $this;
}

Expand Down

0 comments on commit 82db3b0

Please sign in to comment.