@Tobion If there is no path in the URL, ``parse_url`` will not put an empty string in ``$urlParts['path']``. It will not set the ``path`` key at all, so it won't reach the ``substr`` call.