PATH_INFO isn’t always set. It is only set if there was trailing path info after the script.
For example if you have a file located here: localhost/index.php And you access it via this url: localhost/index.php/foo/bar
then $_SERVER[‘PATH_INFO’] will be set to a value of “/foo/bar”
but if you access the script via the url: localhost/index.php then PATH_INFO will not be set and you will see a notice like that for attempting to access an undefined index of an array