Skip to content

Fixed return type for RedistList::get()#96

Merged
trowski merged 1 commit into
amphp:2.xfrom
Bilge:fix-list-get
Aug 3, 2024
Merged

Fixed return type for RedistList::get()#96
trowski merged 1 commit into
amphp:2.xfrom
Bilge:fix-list-get

Conversation

@Bilge

@Bilge Bilge commented Jul 28, 2024

Copy link
Copy Markdown
Contributor

This fixes a bug that caused the following exception to be thrown when the list key did not exist:

TypeError : Amp\Redis\Command\RedisList::get(): Return value must be of type string, null returned

As a bonus, we expanded the allowed types for RedistList::get to include integer, which is probably the type it should have always been. We don't replace string at this time, though, for BC reasons.

Expanded allowed types for RedistList::get to include integer.
@trowski trowski merged commit a1e8cdc into amphp:2.x Aug 3, 2024
@trowski

trowski commented Aug 3, 2024

Copy link
Copy Markdown
Member

Thanks!

@Bilge Bilge deleted the fix-list-get branch August 3, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants