That's because when you have just "#" in the path and try splitting it using "/" then the array length will be 1 holding the original value and which means you can just access 0th index.To solve this issue, put a if statement before line no 94 to check if there is "/" character present in the path. ...