Skip to content

Commit 82db3b0

Browse files
committed
Allows removement of items with case sensitive keys
1 parent 0c90aeb commit 82db3b0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Cart.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ public function add(...$args): self
8686
*/
8787
public function remove($key)
8888
{
89-
if (isset($this->data[$key])) {
90-
parent::remove($key);
91-
$this->save();
89+
if ($this->caseSensitive !== true) {
90+
$key = strtolower($key);
9291
}
92+
parent::remove($key);
93+
$this->save();
9394
return $this;
9495
}
9596

0 commit comments

Comments
 (0)