silverstripe/sapphire — pull request #1051 by uniun (2012-12-18 09:57:44+00:00)
Title: BUG removeRequiredField() should use array_splice() instead of unset()

Function unset() preserves numeric keys and method removeRequiredField() will give a PHP notice about nonexistent array key and loop won't iterate throughout all elements in array on second method call (and all subsequent).
So it's better to use foreach loop and array_splice() function (it doesn't preserve numeric keys).