I have the following loop, going through an array, and trimming the of element i and then overwriting the element with the trimmed value:
for(a=1; a <= ArrayLen(arguments.locationHeaders); a++){
arguments.locationHeaders[a] = Trim(arguments.locationHeaders[a]);
}
Every so often I get an error stating The element at position X cannot be found.
I'm looping through the very array I'm editing! How can I be OOB...?
If I refresh the browser it works fine.