From: Brion Vibber Date: Wed, 18 Nov 2009 00:24:48 +0000 (-0800) Subject: Declare global usage in common.php so setup works right when called from phpunit... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=63ebb033bf5a991eefdfb0cfff25eed8629a9365;p=quix0rs-gnu-social.git Declare global usage in common.php so setup works right when called from phpunit tests We end up running the tests through a function in PHPUnit, so we don't have automatic global scope at the top level of files all the time... --- diff --git a/lib/common.php b/lib/common.php index 063d7d9d99..203b37c872 100644 --- a/lib/common.php +++ b/lib/common.php @@ -83,6 +83,9 @@ function _sn_to_path($sn) return $p; } +// Save our sanity when code gets loaded through subroutines such as PHPUnit tests +global $default, $config, $_server, $_path; + // try to figure out where we are. $server and $path // can be set by including module, else we guess based // on HTTP info.