fix #1018762 by rjay: Modified code to prevent PHP undefined index notices when the URL contains only one argument after the domain.