Prevent PHP warning when having an empty root

Hello!

strpos() generates a PHP warning when the needle ($root) is empty. Happened when using absolute paths to assets.

Hopes this helps.
Cheers