Skip to content

Commit

Permalink
Fix notice when no data is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlmoon committed Apr 18, 2020
1 parent 312304f commit a5df80d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ public function delete(string $name, $id) {
$class_name = $this->classes[$name];
$mapper = $this->mappers[trim($class_name, '\\')];

if (array_key_exists($id, $this->storage[$name])) {
if (
array_key_exists($name, $this->storage) &&
array_key_exists($id, $this->storage[$name])
) {
unset($this->storage[$name][$id]);
}

Expand Down

0 comments on commit a5df80d

Please sign in to comment.