Uh oh!
There was an error while loading. Please reload this page.
fix: Incorrect type for empty extraSettings in frontend - #1730
Conversation
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
76244f2 to
4d36422CompareCodecov Report
Additional details and impacted files@@ Coverage Diff @@## main #1730 +/- ##
===========================================
+ Coverage 0 42.12% +42.12% - Complexity 0 570 +570
===========================================
Files 0 55 +55 Lines 0 2381 +2381 ===========================================
+ Hits 0 1003 +1003 - Misses 0 1378 +1378 |
susnux
commented
Oct 6, 2023
Not sure if this is a proper fix or just silencing this error. As the error has a reason: The given type a an array instead of the expected object. The reason is if the extra settings are empty, php will return an empty assoc. array which will be converted to |
Chartman123
commented
Oct 6, 2023
Yes, with this fix the extraSettings prop is either an array[0] or an object depending of the result from the database... Do you see any chance to fix this in the backend and always return an object in JSON? |
This fixes an error introduced with the XML fix in #1705
For questions where extraSettings weren't set we got a type mismatch in the extraSettings prop (Object expected, array provided)