Fixing Request resolve #1
This commit is contained in:
+8
-8
@@ -52,7 +52,7 @@ class Request{
|
||||
}
|
||||
|
||||
if (is_array($param)) {
|
||||
return required_param_array($parname, $type);
|
||||
return self::required_param_array($parname, $type);
|
||||
}
|
||||
|
||||
return self::clean_param($param, $type);
|
||||
@@ -79,7 +79,7 @@ class Request{
|
||||
if (!preg_match('/^[a-z0-9_-]+$/i', $key)) {
|
||||
continue;
|
||||
}
|
||||
$result[$key] = clean_param($value, $type);
|
||||
$result[$key] = self::clean_param($value, $type);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@@ -137,12 +137,12 @@ class Request{
|
||||
global $CFG;
|
||||
|
||||
if (is_array($param)) {
|
||||
throw new coding_exception('clean_param() can not process arrays, please use clean_param_array() instead.');
|
||||
throw new coding_exception('clean_param() can not process arrays, please use self::clean_param_array() instead.');
|
||||
} else if (is_object($param)) {
|
||||
if (method_exists($param, '__toString')) {
|
||||
$param = $param->__toString();
|
||||
} else {
|
||||
throw new coding_exception('clean_param() can not process objects, please use clean_param_array() instead.');
|
||||
throw new coding_exception('clean_param() can not process objects, please use self::clean_param_array() instead.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ class Request{
|
||||
if ($crumb === '.' && $key === 0) {
|
||||
// Special condition to allow for relative current path such as ./currentdirfile.txt.
|
||||
} else {
|
||||
$crumb = clean_param($crumb, PARAM_FILE);
|
||||
$crumb = self::clean_param($crumb, PARAM_FILE);
|
||||
}
|
||||
$breadcrumb[$key] = $crumb;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ class Request{
|
||||
if (preg_match('/^-----BEGIN CERTIFICATE-----([\s\w\/\+=]+)-----END CERTIFICATE-----$/', trim($param), $matches)) {
|
||||
list($wholething, $body) = $matches;
|
||||
unset($wholething, $matches);
|
||||
$b64 = clean_param($body, PARAM_BASE64);
|
||||
$b64 = self::clean_param($body, PARAM_BASE64);
|
||||
if (!empty($b64)) {
|
||||
return "-----BEGIN CERTIFICATE-----\n$b64\n-----END CERTIFICATE-----\n";
|
||||
} else {
|
||||
@@ -411,7 +411,7 @@ class Request{
|
||||
$tags = explode(',', $param);
|
||||
$result = array();
|
||||
foreach ($tags as $tag) {
|
||||
$res = clean_param($tag, PARAM_TAG);
|
||||
$res = self::clean_param($tag, PARAM_TAG);
|
||||
if ($res !== '') {
|
||||
$result[] = $res;
|
||||
}
|
||||
@@ -810,4 +810,4 @@ class Request{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user