Fixed
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
Pothys - MitrahSoftPothys - MitrahSoftPriority
NewFix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
NoneAffects versions
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Pothys - MitrahSoft
Pothys - MitrahSoftPriority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Affects versions
Created 18 November 2021 at 12:07
Updated 27 April 2022 at 16:51
Resolved 6 December 2021 at 12:29
Using arraySlice() function, if the array is empty and the offset is 0 means it throws StackOverflowError. ACF throws an error like Cannot access array element at position 0. https://trycf.com/gist/459d8196c82d86b38113f5429917a0b3/acf2021?theme=monokai
Using empty query with offset 0 in querySlice() also throws StackOverflowError. ACF throws an error like The slice offset 0 is out of bounds. https://trycf.com/gist/84cc8541441ce5e4068827d82e74950f/lucee5?theme=monokai
It would be nice to throw an error like the array/query cannot be empty.
StackTrace
ArraySlice() lucee.runtime.exp.NativeException: java.lang.StackOverflowError at lucee.runtime.type.wrap.ListAsArray.size(ListAsArray.java:438) at lucee.runtime.functions.arrays.ArraySlice.call(ArraySlice.java:42) at lucee.runtime.functions.arrays.ArraySlice.call(ArraySlice.java:53) at lucee.runtime.functions.arrays.ArraySlice.call(ArraySlice.java:53) QuerySlice() lucee.runtime.exp.NativeException: java.lang.StackOverflowError at lucee.runtime.functions.query.QuerySlice.call(QuerySlice.java:43) at lucee.runtime.functions.query.QuerySlice.call(QuerySlice.java:54) at lucee.runtime.functions.query.QuerySlice.call(QuerySlice.java:54)