If the iPhone is connected to a Wi-Fi network named "%p%s%s%s%s%n" then it will RiP.
The bug can only be fixed by completely resetting the network settings.
This can be done in the Settings -> General -> Reset -> Reset network settings menu.
There is another way:
The problem this time arises...