Just a reminder: always *set* global variables before attempting to use them. Many sites still use the unsafe 'register_globals' PHP configuration, by which any remote visitor can stuff arbitrary string or array data into global variables -- if you don't override this value in the code, then the user-supplied data can end up being used when an empty or privileged host-set value was expected.
Using error_reporting set to E_ALL during development helps catch some of these mistakes, but not all. In particular it does *not* catch: * testing with isset() will of course not throw an error on an unset variable! * something like "global $wgFoo; if( $wgFoo ) {...}" will not throw an error, since the "global" statement binds the variable name in the local scope.
If you deliberately want a global variable to be empty, set it to null or use unset(); $wgFoo = null; or unset( $wgFoo );
(The exact semantics of the two are a bit different, but either will make isset( $wgFoo ) return false.)
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org