Skip to content

Conversation

@tiefenb
Copy link

@tiefenb tiefenb commented May 6, 2025

Replaced each('value') with Manual Loops:
For both $value and $_value, if they are instances of SelectExtOptionArray, we iterate over each item and collect the value property into $array1 or $array2.

Handled Different Value Types:
Properly checks if $value is a SelectExtOption, SelectExtOptionArray, array, or numeric, and processes each case to build $array1 and $int1 accordingly.

This approach ensures that we're working with plain PHP arrays, preventing the type error when using array_values().

This approach ensures that we're working with plain PHP arrays, preventing the type error when using array_values().
@kixe
Copy link
Owner

kixe commented May 6, 2025

SelectExtOptionArray::each('SelectExtOptionProperty') should always return a PHP array. I can't see any case where this function returns an object of type SelectExtOptionArray. Maybe you are using a different version or modified code, as the error also marks a different line in the code, as I had mentioned here before: #19 (comment) Thanks for helping to understand the issue.

@tiefenb
Copy link
Author

tiefenb commented May 6, 2025

I don't know - I upgraded from Version 2.1.3 to 2.2.0. The only modified code I'm using in our version is const OPTIONSLIMIT = 2000;

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.

2 participants