aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/request
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2020-05-09 01:15:08 +0200
committerMaat <maat-pub@mageia.biz>2020-05-09 01:15:08 +0200
commit6985226b17e8a0ef0a720bf1d12fe0c216e13dab (patch)
tree116d2565ac02c40abe0548863c6badf8ec3e1d1e /phpBB/phpbb/request
parent8ea437e30605e0f66b5220bf904a61d7c1d11ddd (diff)
parent8d00784dfe2c8bcb10843ff70b4cfa998d703285 (diff)
downloadforums-master.tar
forums-master.tar.gz
forums-master.tar.bz2
forums-master.tar.xz
forums-master.zip
Merge remote-tracking branch 'upstream/prep-release-3.3.0'HEADmaster
Diffstat (limited to 'phpBB/phpbb/request')
-rw-r--r--phpBB/phpbb/request/request.php8
-rw-r--r--phpBB/phpbb/request/request_interface.php4
-rw-r--r--phpBB/phpbb/request/type_cast_helper.php3
3 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php
index a0267d1370..4d7bc9ea48 100644
--- a/phpBB/phpbb/request/request.php
+++ b/phpBB/phpbb/request/request.php
@@ -179,7 +179,7 @@ class request implements \phpbb\request\request_interface
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
- * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
@@ -203,7 +203,7 @@ class request implements \phpbb\request\request_interface
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
- * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
@@ -268,7 +268,7 @@ class request implements \phpbb\request\request_interface
* whatever).
*
* @param string|array $var_name See \phpbb\request\request_interface::variable
- * @param mixed $Default See \phpbb\request\request_interface::variable
+ * @param mixed $default See \phpbb\request\request_interface::variable
*
* @return mixed The server variable value.
*/
@@ -395,7 +395,7 @@ class request implements \phpbb\request\request_interface
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
- * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
diff --git a/phpBB/phpbb/request/request_interface.php b/phpBB/phpbb/request/request_interface.php
index 3bfa8bb424..a1fbf0ae45 100644
--- a/phpBB/phpbb/request/request_interface.php
+++ b/phpBB/phpbb/request/request_interface.php
@@ -54,7 +54,7 @@ interface request_interface
* then specifying array("var", 1) as the name will return "a".
* @param mixed $default A default value that is returned if the variable was not set.
* This function will always return a value of the same type as the default.
- * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
@@ -104,7 +104,7 @@ interface request_interface
*
* @return mixed The header value.
*/
- public function header($var_name, $default = '');
+ public function header($header_name, $default = '');
/**
* Checks whether a certain variable was sent via POST.
diff --git a/phpBB/phpbb/request/type_cast_helper.php b/phpBB/phpbb/request/type_cast_helper.php
index 912494998d..39d5908fd3 100644
--- a/phpBB/phpbb/request/type_cast_helper.php
+++ b/phpBB/phpbb/request/type_cast_helper.php
@@ -106,7 +106,8 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
return;
}
- list($default_key, $default_value) = each($default);
+ $default_key = key($default);
+ $default_value = current($default);
$key_type = gettype($default_key);
$_var = $var;