X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debugger%2Fcommon.php;h=d6e43fe017eb236d26fe631513ca0f3300bd208b;hb=4e5288ea7f3cc91e029a9edd0ab0b9a26b72c972;hp=2ce760b84400864372cf2312a1167468a9514db8;hpb=03d55a0c7c2dacbbbe9cddf5cd00b0d8a8750902;p=plcapi.git diff --git a/debugger/common.php b/debugger/common.php index 2ce760b..d6e43fe 100644 --- a/debugger/common.php +++ b/debugger/common.php @@ -1,7 +1,7 @@ $v) { + if (!in_array($k, $noUnset) && isset($GLOBALS[$k])) { + unset($GLOBALS[$k]); + } + } + } + unregister_globals(); +} + // work around magic quotes if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { function stripslashes_deep($value) @@ -35,10 +72,11 @@ if (isset($_GET['usepost']) && $_GET['usepost'] === 'true') { /// @todo if $inputcharset is not UTF8, we should probably re-encode $_GET to make it UTF-8 // recover input parameters +/// @todo instead of using globals, move them to an array. Also: use a class for this parsing... $debug = false; $protocol = 0; $run = false; -$wstype = 0; +$wstype = defined('DEFAULT_WSTYPE') ? DEFAULT_WSTYPE : 0; $id = ''; if (isset($_GET['action'])) { if (isset($_GET['wstype']) && $_GET['wstype'] == '1') {