#264282: Check for errors before doing foreach on an item that might not be an array when breaking 1,2,3