This bug is caused because mb_strtolower() will always return a string. Here is a possible fix: **Url.php** ``` - $this->scheme = mb_strtolower($scheme, 'UTF-8'); + $this->scheme = $scheme ? mb_strtolower($scheme, 'UTF-8') : NULL; ```