If you can go this route, you should.
To learn more, see our.
Add or isset only after verifying functionality.
You should really be checking for this issue and handling it appropriately, either serving a different message, or even just returning a null value for everything else to identify the precise state.
I used to use this script for years and I've never had any problem.
To do this, you should consult Apache 2, Nginx, or whatever your server of choice is.