mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Deprecated each() function in php 7.2
This commit is contained in:
parent
0aae80ba8e
commit
3d817078a6
15 changed files with 49 additions and 45 deletions
|
@ -1028,13 +1028,13 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
|
|||
if (!is_array($default)) {
|
||||
$type = gettype($default);
|
||||
} else {
|
||||
list($key_type, $type) = each($default);
|
||||
list($key_type, $type) = $default;
|
||||
$type = gettype($type);
|
||||
$key_type = gettype($key_type);
|
||||
if ($type == 'array') {
|
||||
reset($default);
|
||||
$default = current($default);
|
||||
list($sub_key_type, $sub_type) = each($default);
|
||||
list($sub_key_type, $sub_type) = $default;
|
||||
$sub_type = gettype($sub_type);
|
||||
$sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
|
||||
$sub_key_type = gettype($sub_key_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue