Skip to content

avoid errors for non 0 indexed arrays - #135

Open
lekoala wants to merge 1 commit into
cronofy:masterfrom
lekoala:patch-3
Open

avoid errors for non 0 indexed arrays#135
lekoala wants to merge 1 commit into
cronofy:masterfrom
lekoala:patch-3

Conversation

@lekoala

@lekoala lekoala commented Aug 19, 2024

Copy link
Copy Markdown
Contributor

if you have an array like

[
1 => 'something',
2 => 'something else',
]

for example, after array_unique or array_filter, then current code doesn't work. foreach will happily iterate on any values and seems a safer option

(had the issue on my project, fixed it upstream by ensuring a properly 0 indexed array, but that seems good to have nonetheless)

if you have an array like

[
1 => 'something',
2 => 'something else',
]

for example, after array_unique or array_filter, then current code doesn't work. foreach will happily iterate on any values and seems a safer option

(had the issue on my project, fixed it upstream by ensuring a properly 0 indexed array, but that seems good to have nonetheless)
@lekoala

lekoala commented Jan 5, 2025

Copy link
Copy Markdown
Contributor Author

@Nevett coud you have a look at this?

@lekoala

lekoala commented Jan 20, 2025

Copy link
Copy Markdown
Contributor Author

or @Haziba ? :-)

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