Skip to content

Commit

Permalink
PR Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurynas Griciūnas committed Aug 2, 2024
1 parent 2466525 commit 8c73aa0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 2.6.1
### Fixed
- Changed `\Paysera\Component\RestClientCommon\Entity\Result::getItems` to always return an array, empty one if the value is null.

## 2.7.0
### Changed
- Minimal version of PHP is increased to `7.4`.
Expand Down
4 changes: 3 additions & 1 deletion src/Entity/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public function count()

public function getItems()
{
return $this->get($this->dataKey);
$items = $this->get($this->dataKey);

return is_array($items) ? $items : [];
}

public function getMetadata()
Expand Down

0 comments on commit 8c73aa0

Please sign in to comment.