Skip to content

Commit

Permalink
Bugfix when value is null (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm authored Mar 28, 2017
1 parent cc7cc76 commit 1881182
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee

## UNRELEASED

## 0.5.1

### Fixed

* Bug on `TaggablePSR6ItemAdapter::isItemCreatedHere` where item value was `null`.

## 0.5.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion TaggablePSR6ItemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,6 @@ private function initializeTags()
*/
private function isItemCreatedHere($rawItem)
{
return is_array($rawItem) && isset($rawItem['value']) && isset($rawItem['tags']) && count($rawItem) === 2;
return is_array($rawItem) && array_key_exists('value', $rawItem) && array_key_exists('tags', $rawItem) && count($rawItem) === 2;
}
}

0 comments on commit 1881182

Please sign in to comment.