Hello, Am Dienstag, 28. Juni 2005 15:39 schrieb Ludwig Nussel:
Bob Vickers wrote:
These mistakes would probably be avoided if people used set -o nounset in their scripts. It is like using -w in perl: why get your customers to debug your scripts if the interpreter does it for free?
That doesn't help as it only checks the code that is exectuted and not the whole script. If it triggers it terminates the script instantly
OK, that's an argument against using it in production environment.
[...] Furthermore there are many valid uses of unset variables, e.g. optional parameters.
Hmm - when I hear about unset variables, I have to think to PHP's register_globals which is turned off by default now for security reasons. Are you _really_ sure that using unset / not initialized variables is a good idea? (I am not.) At least you should explicitly unset or initialize these variables to avoid trouble or possible attacks. Regards, Christian Boltz -- # GO AWAY ! # YOU DO NOT WANT TO SEE THIS SCRIPT !!! [from /opt/kde3/share/apps/krpmview/setup_temp_source]