mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Short list syntax can be used
Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
parent
4bb72dfe59
commit
742575bb56
7 changed files with 10 additions and 10 deletions
|
@ -689,13 +689,13 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
|
|||
if (!is_array($default)) {
|
||||
$type = gettype($default);
|
||||
} else {
|
||||
list($key_type, $type) = $default;
|
||||
[$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) = $default;
|
||||
[$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