When changing the protection on https://en.wikipedia.org/w/index.php?title=Kingdom_of_England&action=history from semi-protection to extended-confirmed-protection, I submitted the form and was sent back to the "change protection settings" screen with a red "Invalid expiration date." error at the top. I submitted the form again without making any changes, and it redirected me back to the article. However, based on the history, it seems that both protection attempts modified the protection settings in the database.
The expected behavior is for the protection form not to throw an error for no reason - and that if it does throw an error for some legitimate reason, then it should not also perform the action that supposedly caused the error.
The message shown is `stabilize_expiry_invalid`, which is returned when `PageStabilityForm::getExpiry` considers an expiry to be invalid
I can only find [[ https://github.com/wikimedia/mediawiki-extensions-FlaggedRevs/blob/master/business/PageStabilityForm.php#L242 | one test ]] that causes that error. FlaggedRevs should be modified to not throw that error when the user is not trying to enable Pending Changes.
Apparently this happens fairly regularly, @Primefac mentioned this being something that they encounter routinely.