List of steps to reproduce (step by step, including full links if applicable):
What happens?:
Has an option to upload protect the file. Attempting to upload protect the file result in a malformed log entry, and no actual protection. This is because WikiPage::doUpdateRestrictions strips the upload protection and only allows create protection for non-existent pages, but still creates the log entry, while RestrictionStore::listAllRestrictionTypes still returns upload protection as a restriction for non-existent titles.
What should have happened instead?:
No option to upload protect the file.
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc: