Canonical: Check if the URL scheme exists in strip_fragment_from_url().
strip_fragment_from_url()
This avoids an "Undefined index" PHP notice when a schemeless URI is passed.
Props dd32, SergeyBiryukov. Fixes #55333.