Skip to content

Conversation

kemalkastrataj
Copy link

@kemalkastrataj kemalkastrataj commented Aug 24, 2024

Fixed an issue where the use of array_diff on nested arrays caused PHP "Array to string conversion" warnings. We introduced a new method, arrays_are_equal_recursive, that recursively compares both flat and nested arrays, ensuring that valid comparisons are made without triggering errors. This ensures that even complex, nested array structures are handled correctly while maintaining the integrity of the comparison logic in matchExtends.

By replacing the flat array checks with a recursive comparison method, we resolved the issue without skipping valid comparisons, ensuring robustness and preventing potential logic gaps. This update follows best practices by keeping the array comparison logic modular and reusable, promoting maintainability and reducing the risk of future errors in complex array operations.

Admin edit: Closes #801, See scssphp/scssphp#606 (comment), scssphp/scssphp#728

…g conversion warnings

Fixed an issue where the use of array_diff on nested arrays caused PHP "Array to string conversion" warnings. We introduced a new method, arrays_are_equal_recursive, that recursively compares both flat and nested arrays, ensuring that valid comparisons are made without triggering errors. This ensures that even complex, nested array structures are handled correctly while maintaining the integrity of the comparison logic in matchExtends.

By replacing the flat array checks with a recursive comparison method, we resolved the issue without skipping valid comparisons, ensuring robustness and preventing potential logic gaps. This update follows best practices by keeping the array comparison logic modular and reusable, promoting maintainability and reducing the risk of future errors in complex array operations.
@kemalkastrataj kemalkastrataj deleted the bootscore-patch-scssphp-compiler-1 branch August 24, 2024 23:11
@kemalkastrataj kemalkastrataj restored the bootscore-patch-scssphp-compiler-1 branch August 24, 2024 23:11
@kemalkastrataj kemalkastrataj deleted the bootscore-patch-scssphp-compiler-1 branch August 24, 2024 23:11
@crftwrk
Copy link
Member

crftwrk commented Aug 27, 2024

May I ask why you closed this PR? It can fix #801 in a better way than #823. But maybe better to pr this to scssphp.

@crftwrk crftwrk moved this from Todo to Done in v7 May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Compile error using woocommerce css
2 participants