The fix is simple. You just need to reset all network settings, 9to5Mac noted. This can be done by going to Settings > General > Reset > Reset Network Settings. Doing this resets all saved wifi networks on your iPhone, consequently erasing the cursed network name from the device’s memory. After that, your phone should be able to connect to wifi normally once more.