Code Duplication    Length = 42-42 lines in 12 locations

application/tests/_ci_phpunit_test/replacing/core/CodeIgniter.php 1 location

@@ 89-130 (lines=42) @@
86
 * ------------------------------------------------------
87
 */
88
89
if ( ! is_php('5.4'))
90
{
91
	ini_set('magic_quotes_runtime', 0);
92
93
	if ((bool) ini_get('register_globals'))
94
	{
95
		$_protected = array(
96
			'_SERVER',
97
			'_GET',
98
			'_POST',
99
			'_FILES',
100
			'_REQUEST',
101
			'_SESSION',
102
			'_ENV',
103
			'_COOKIE',
104
			'GLOBALS',
105
			'HTTP_RAW_POST_DATA',
106
			'system_path',
107
			'application_folder',
108
			'view_folder',
109
			'_protected',
110
			'_registered'
111
		);
112
113
		$_registered = ini_get('variables_order');
114
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
115
		{
116
			if (strpos($_registered, $key) === FALSE)
117
			{
118
				continue;
119
			}
120
121
			foreach (array_keys($$superglobal) as $var)
122
			{
123
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
124
				{
125
					$GLOBALS[$var] = NULL;
126
				}
127
			}
128
		}
129
	}
130
}
131
132
133
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.0.3-CodeIgniter.php 1 location

@@ 86-127 (lines=42) @@
83
 * ------------------------------------------------------
84
 */
85
86
if ( ! is_php('5.4'))
87
{
88
	ini_set('magic_quotes_runtime', 0);
89
90
	if ((bool) ini_get('register_globals'))
91
	{
92
		$_protected = array(
93
			'_SERVER',
94
			'_GET',
95
			'_POST',
96
			'_FILES',
97
			'_REQUEST',
98
			'_SESSION',
99
			'_ENV',
100
			'_COOKIE',
101
			'GLOBALS',
102
			'HTTP_RAW_POST_DATA',
103
			'system_path',
104
			'application_folder',
105
			'view_folder',
106
			'_protected',
107
			'_registered'
108
		);
109
110
		$_registered = ini_get('variables_order');
111
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
112
		{
113
			if (strpos($_registered, $key) === FALSE)
114
			{
115
				continue;
116
			}
117
118
			foreach (array_keys($$superglobal) as $var)
119
			{
120
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
121
				{
122
					$GLOBALS[$var] = NULL;
123
				}
124
			}
125
		}
126
	}
127
}
128
129
130
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.0.4-CodeIgniter.php 1 location

@@ 86-127 (lines=42) @@
83
 * ------------------------------------------------------
84
 */
85
86
if ( ! is_php('5.4'))
87
{
88
	ini_set('magic_quotes_runtime', 0);
89
90
	if ((bool) ini_get('register_globals'))
91
	{
92
		$_protected = array(
93
			'_SERVER',
94
			'_GET',
95
			'_POST',
96
			'_FILES',
97
			'_REQUEST',
98
			'_SESSION',
99
			'_ENV',
100
			'_COOKIE',
101
			'GLOBALS',
102
			'HTTP_RAW_POST_DATA',
103
			'system_path',
104
			'application_folder',
105
			'view_folder',
106
			'_protected',
107
			'_registered'
108
		);
109
110
		$_registered = ini_get('variables_order');
111
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
112
		{
113
			if (strpos($_registered, $key) === FALSE)
114
			{
115
				continue;
116
			}
117
118
			foreach (array_keys($$superglobal) as $var)
119
			{
120
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
121
				{
122
					$GLOBALS[$var] = NULL;
123
				}
124
			}
125
		}
126
	}
127
}
128
129
130
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.0.5-CodeIgniter.php 1 location

@@ 86-127 (lines=42) @@
83
 * ------------------------------------------------------
84
 */
85
86
if ( ! is_php('5.4'))
87
{
88
	ini_set('magic_quotes_runtime', 0);
89
90
	if ((bool) ini_get('register_globals'))
91
	{
92
		$_protected = array(
93
			'_SERVER',
94
			'_GET',
95
			'_POST',
96
			'_FILES',
97
			'_REQUEST',
98
			'_SESSION',
99
			'_ENV',
100
			'_COOKIE',
101
			'GLOBALS',
102
			'HTTP_RAW_POST_DATA',
103
			'system_path',
104
			'application_folder',
105
			'view_folder',
106
			'_protected',
107
			'_registered'
108
		);
109
110
		$_registered = ini_get('variables_order');
111
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
112
		{
113
			if (strpos($_registered, $key) === FALSE)
114
			{
115
				continue;
116
			}
117
118
			foreach (array_keys($$superglobal) as $var)
119
			{
120
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
121
				{
122
					$GLOBALS[$var] = NULL;
123
				}
124
			}
125
		}
126
	}
127
}
128
129
130
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.0.6-CodeIgniter.php 1 location

@@ 86-127 (lines=42) @@
83
 * ------------------------------------------------------
84
 */
85
86
if ( ! is_php('5.4'))
87
{
88
	ini_set('magic_quotes_runtime', 0);
89
90
	if ((bool) ini_get('register_globals'))
91
	{
92
		$_protected = array(
93
			'_SERVER',
94
			'_GET',
95
			'_POST',
96
			'_FILES',
97
			'_REQUEST',
98
			'_SESSION',
99
			'_ENV',
100
			'_COOKIE',
101
			'GLOBALS',
102
			'HTTP_RAW_POST_DATA',
103
			'system_path',
104
			'application_folder',
105
			'view_folder',
106
			'_protected',
107
			'_registered'
108
		);
109
110
		$_registered = ini_get('variables_order');
111
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
112
		{
113
			if (strpos($_registered, $key) === FALSE)
114
			{
115
				continue;
116
			}
117
118
			foreach (array_keys($$superglobal) as $var)
119
			{
120
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
121
				{
122
					$GLOBALS[$var] = NULL;
123
				}
124
			}
125
		}
126
	}
127
}
128
129
130
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.1.0-CodeIgniter.php 1 location

@@ 86-127 (lines=42) @@
83
 * ------------------------------------------------------
84
 */
85
86
if ( ! is_php('5.4'))
87
{
88
	ini_set('magic_quotes_runtime', 0);
89
90
	if ((bool) ini_get('register_globals'))
91
	{
92
		$_protected = array(
93
			'_SERVER',
94
			'_GET',
95
			'_POST',
96
			'_FILES',
97
			'_REQUEST',
98
			'_SESSION',
99
			'_ENV',
100
			'_COOKIE',
101
			'GLOBALS',
102
			'HTTP_RAW_POST_DATA',
103
			'system_path',
104
			'application_folder',
105
			'view_folder',
106
			'_protected',
107
			'_registered'
108
		);
109
110
		$_registered = ini_get('variables_order');
111
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
112
		{
113
			if (strpos($_registered, $key) === FALSE)
114
			{
115
				continue;
116
			}
117
118
			foreach (array_keys($$superglobal) as $var)
119
			{
120
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
121
				{
122
					$GLOBALS[$var] = NULL;
123
				}
124
			}
125
		}
126
	}
127
}
128
129
130
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.1.2-CodeIgniter.php 1 location

@@ 86-127 (lines=42) @@
83
 * ------------------------------------------------------
84
 */
85
86
if ( ! is_php('5.4'))
87
{
88
	ini_set('magic_quotes_runtime', 0);
89
90
	if ((bool) ini_get('register_globals'))
91
	{
92
		$_protected = array(
93
			'_SERVER',
94
			'_GET',
95
			'_POST',
96
			'_FILES',
97
			'_REQUEST',
98
			'_SESSION',
99
			'_ENV',
100
			'_COOKIE',
101
			'GLOBALS',
102
			'HTTP_RAW_POST_DATA',
103
			'system_path',
104
			'application_folder',
105
			'view_folder',
106
			'_protected',
107
			'_registered'
108
		);
109
110
		$_registered = ini_get('variables_order');
111
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
112
		{
113
			if (strpos($_registered, $key) === FALSE)
114
			{
115
				continue;
116
			}
117
118
			foreach (array_keys($$superglobal) as $var)
119
			{
120
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
121
				{
122
					$GLOBALS[$var] = NULL;
123
				}
124
			}
125
		}
126
	}
127
}
128
129
130
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.1.3-CodeIgniter.php 1 location

@@ 89-130 (lines=42) @@
86
 * ------------------------------------------------------
87
 */
88
89
if ( ! is_php('5.4'))
90
{
91
	ini_set('magic_quotes_runtime', 0);
92
93
	if ((bool) ini_get('register_globals'))
94
	{
95
		$_protected = array(
96
			'_SERVER',
97
			'_GET',
98
			'_POST',
99
			'_FILES',
100
			'_REQUEST',
101
			'_SESSION',
102
			'_ENV',
103
			'_COOKIE',
104
			'GLOBALS',
105
			'HTTP_RAW_POST_DATA',
106
			'system_path',
107
			'application_folder',
108
			'view_folder',
109
			'_protected',
110
			'_registered'
111
		);
112
113
		$_registered = ini_get('variables_order');
114
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
115
		{
116
			if (strpos($_registered, $key) === FALSE)
117
			{
118
				continue;
119
			}
120
121
			foreach (array_keys($$superglobal) as $var)
122
			{
123
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
124
				{
125
					$GLOBALS[$var] = NULL;
126
				}
127
			}
128
		}
129
	}
130
}
131
132
133
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.1.4-CodeIgniter.php 1 location

@@ 89-130 (lines=42) @@
86
 * ------------------------------------------------------
87
 */
88
89
if ( ! is_php('5.4'))
90
{
91
	ini_set('magic_quotes_runtime', 0);
92
93
	if ((bool) ini_get('register_globals'))
94
	{
95
		$_protected = array(
96
			'_SERVER',
97
			'_GET',
98
			'_POST',
99
			'_FILES',
100
			'_REQUEST',
101
			'_SESSION',
102
			'_ENV',
103
			'_COOKIE',
104
			'GLOBALS',
105
			'HTTP_RAW_POST_DATA',
106
			'system_path',
107
			'application_folder',
108
			'view_folder',
109
			'_protected',
110
			'_registered'
111
		);
112
113
		$_registered = ini_get('variables_order');
114
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
115
		{
116
			if (strpos($_registered, $key) === FALSE)
117
			{
118
				continue;
119
			}
120
121
			foreach (array_keys($$superglobal) as $var)
122
			{
123
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
124
				{
125
					$GLOBALS[$var] = NULL;
126
				}
127
			}
128
		}
129
	}
130
}
131
132
133
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.1.5-CodeIgniter.php 1 location

@@ 89-130 (lines=42) @@
86
 * ------------------------------------------------------
87
 */
88
89
if ( ! is_php('5.4'))
90
{
91
	ini_set('magic_quotes_runtime', 0);
92
93
	if ((bool) ini_get('register_globals'))
94
	{
95
		$_protected = array(
96
			'_SERVER',
97
			'_GET',
98
			'_POST',
99
			'_FILES',
100
			'_REQUEST',
101
			'_SESSION',
102
			'_ENV',
103
			'_COOKIE',
104
			'GLOBALS',
105
			'HTTP_RAW_POST_DATA',
106
			'system_path',
107
			'application_folder',
108
			'view_folder',
109
			'_protected',
110
			'_registered'
111
		);
112
113
		$_registered = ini_get('variables_order');
114
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
115
		{
116
			if (strpos($_registered, $key) === FALSE)
117
			{
118
				continue;
119
			}
120
121
			foreach (array_keys($$superglobal) as $var)
122
			{
123
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
124
				{
125
					$GLOBALS[$var] = NULL;
126
				}
127
			}
128
		}
129
	}
130
}
131
132
133
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.1.6-CodeIgniter.php 1 location

@@ 89-130 (lines=42) @@
86
 * ------------------------------------------------------
87
 */
88
89
if ( ! is_php('5.4'))
90
{
91
	ini_set('magic_quotes_runtime', 0);
92
93
	if ((bool) ini_get('register_globals'))
94
	{
95
		$_protected = array(
96
			'_SERVER',
97
			'_GET',
98
			'_POST',
99
			'_FILES',
100
			'_REQUEST',
101
			'_SESSION',
102
			'_ENV',
103
			'_COOKIE',
104
			'GLOBALS',
105
			'HTTP_RAW_POST_DATA',
106
			'system_path',
107
			'application_folder',
108
			'view_folder',
109
			'_protected',
110
			'_registered'
111
		);
112
113
		$_registered = ini_get('variables_order');
114
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
115
		{
116
			if (strpos($_registered, $key) === FALSE)
117
			{
118
				continue;
119
			}
120
121
			foreach (array_keys($$superglobal) as $var)
122
			{
123
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
124
				{
125
					$GLOBALS[$var] = NULL;
126
				}
127
			}
128
		}
129
	}
130
}
131
132
133
/*

application/tests/_ci_phpunit_test/replacing/core/old/3.1.7-CodeIgniter.php 1 location

@@ 89-130 (lines=42) @@
86
 * ------------------------------------------------------
87
 */
88
89
if ( ! is_php('5.4'))
90
{
91
	ini_set('magic_quotes_runtime', 0);
92
93
	if ((bool) ini_get('register_globals'))
94
	{
95
		$_protected = array(
96
			'_SERVER',
97
			'_GET',
98
			'_POST',
99
			'_FILES',
100
			'_REQUEST',
101
			'_SESSION',
102
			'_ENV',
103
			'_COOKIE',
104
			'GLOBALS',
105
			'HTTP_RAW_POST_DATA',
106
			'system_path',
107
			'application_folder',
108
			'view_folder',
109
			'_protected',
110
			'_registered'
111
		);
112
113
		$_registered = ini_get('variables_order');
114
		foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
115
		{
116
			if (strpos($_registered, $key) === FALSE)
117
			{
118
				continue;
119
			}
120
121
			foreach (array_keys($$superglobal) as $var)
122
			{
123
				if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
124
				{
125
					$GLOBALS[$var] = NULL;
126
				}
127
			}
128
		}
129
	}
130
}
131
132
133
/*