aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/request/type_cast_helper.php
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2020-05-08 21:52:11 +0200
committerMaat <maat-pub@mageia.biz>2020-05-08 21:52:11 +0200
commit8ea437e30605e0f66b5220bf904a61d7c1d11ddd (patch)
treee0db2bb4a012d5b06a633160b19f62f4868ecd28 /phpBB/phpbb/request/type_cast_helper.php
parent36bc1870f21fac04736a1049c1d5b8e127d729f4 (diff)
parent2fdd46b36431ae0f58bb2e78e42553168db9a0ff (diff)
downloadforums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.gz
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.bz2
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.xz
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.zip
Merge remote-tracking branch 'upstream/prep-release-3.2.9'
Diffstat (limited to 'phpBB/phpbb/request/type_cast_helper.php')
-rw-r--r--phpBB/phpbb/request/type_cast_helper.php66
1 files changed, 0 insertions, 66 deletions
diff --git a/phpBB/phpbb/request/type_cast_helper.php b/phpBB/phpbb/request/type_cast_helper.php
index bc654e6182..912494998d 100644
--- a/phpBB/phpbb/request/type_cast_helper.php
+++ b/phpBB/phpbb/request/type_cast_helper.php
@@ -18,69 +18,6 @@ namespace phpbb\request;
*/
class type_cast_helper implements \phpbb\request\type_cast_helper_interface
{
-
- /**
- * @var string Whether slashes need to be stripped from input
- */
- protected $strip;
-
- /**
- * Initialises the type cast helper class.
- * All it does is find out whether magic quotes are turned on.
- */
- public function __construct()
- {
- if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
- {
- $this->strip = false;
- }
- else
- {
- $this->strip = (@get_magic_quotes_gpc()) ? true : false;
- }
- }
-
- /**
- * Recursively applies addslashes to a variable.
- *
- * @param mixed &$var Variable passed by reference to which slashes will be added.
- */
- public function addslashes_recursively(&$var)
- {
- if (is_string($var))
- {
- $var = addslashes($var);
- }
- else if (is_array($var))
- {
- $var_copy = $var;
- $var = array();
- foreach ($var_copy as $key => $value)
- {
- if (is_string($key))
- {
- $key = addslashes($key);
- }
- $var[$key] = $value;
-
- $this->addslashes_recursively($var[$key]);
- }
- }
- }
-
- /**
- * Recursively applies addslashes to a variable if magic quotes are turned on.
- *
- * @param mixed &$var Variable passed by reference to which slashes will be added.
- */
- public function add_magic_quotes(&$var)
- {
- if ($this->strip)
- {
- $this->addslashes_recursively($var);
- }
- }
-
/**
* Set variable $result to a particular type.
*
@@ -129,8 +66,6 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
$result = preg_replace('/[\x80-\xFF]/', '?', $result);
}
}
-
- $result = ($this->strip) ? stripslashes($result) : $result;
}
}
@@ -172,7 +107,6 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
}
list($default_key, $default_value) = each($default);
- $value_type = gettype($default_value);
$key_type = gettype($default_key);
$_var = $var;