Skip to content

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

Open
Laurgrin wants to merge 1 commit into
paysera:masterfrom
Laurgrin:SUPPORT-102182
Open

Changed \Paysera\Component\RestClientCommon\Entity\Result::getItems to always return an array, empty one if the value is null.#16
Laurgrin wants to merge 1 commit into
paysera:masterfrom
Laurgrin:SUPPORT-102182

Conversation

@Laurgrin

@Laurgrin Laurgrin commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

he Result class, which implements the Iterator interface, doesn't properly handle cases where the data for the specified key (default 'items') is not set or is not an array. This can lead to PHP errors when trying to iterate over a Result object using a foreach loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant