升级到31版本、修改学生成绩筛选
This commit is contained in:
1 parent
a79e7bf237
commit
d8ec4fad39
34 files changed
+447
-114
No files matched your search
@@ -1314,6 +1314,21 @@ class Request
|
||||
return isset($this->header[$name]) ? $this->header[$name] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归重置数组指针
|
||||
* @access public
|
||||
* @param array $data 数据源
|
||||
* @return void
|
||||
*/
|
||||
public function arrayReset(array &$data) {
|
||||
foreach ($data as &$value) {
|
||||
if (is_array($value)) {
|
||||
$this->arrayReset($value);
|
||||
}
|
||||
}
|
||||
reset($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取变量 支持过滤和默认值
|
||||
* @access public
|
||||
@@ -1353,7 +1368,10 @@ class Request
|
||||
|
||||
if (is_array($data)) {
|
||||
array_walk_recursive($data, [$this, 'filterValue'], $filter);
|
||||
reset($data);
|
||||
if (version_compare(PHP_VERSION, '7.1.0', '<')) {
|
||||
// 恢复PHP版本低于 7.1 时 array_walk_recursive 中消耗的内部指针
|
||||
$this->arrayReset($data);
|
||||
}
|
||||
} else {
|
||||
$this->filterValue($data, $name, $filter);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user