Skip to content

avoid errors for non 0 indexed arrays#135

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

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

Conversation

@lekoala
Copy link
Copy Markdown
Contributor

@lekoala lekoala commented Aug 19, 2024

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
Copy link
Copy Markdown
Contributor Author

lekoala commented Jan 5, 2025

@Nevett coud you have a look at this?

@lekoala
Copy link
Copy Markdown
Contributor Author

lekoala commented Jan 20, 2025

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