Comment 4 for bug 949683

Hi jakub!

use substr($url,-1)
it doesn't crash with a empty string.