Skip to content

Commit 1ec2705

Browse files
authored
Make sure to check if 'category' exists (#133)
1 parent 86c5e92 commit 1ec2705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Model/Metadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function getAllInCategory($category)
166166
public function removeAllInCategory($category)
167167
{
168168
foreach ($this->notes as $i => $note) {
169-
if ($note['category'] === $category) {
169+
if (isset($note['category']) && $note['category'] === $category) {
170170
unset($this->notes[$i]);
171171
}
172172
}

0 commit comments

Comments
 (0)