Prevent accessing the index 1 in the array if the size is zero.
Description
Prevent accessing the index 1 in the array if the size is zero.
Checklist
-
I have checked that my code follows the Octopus coding standards -
I have added tests for all the new features added in this request.