1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 07:08:09 +01:00

Merge branch 'develop-ascraeus' into develop

* develop-ascraeus:
  [ticket/13597] Modify variable-variable syntax to be compatible with PHP7
This commit is contained in:
Andreas Fischer 2015-02-11 16:53:25 +01:00
commit 069738a1f2
7 changed files with 14 additions and 14 deletions

View File

@ -198,9 +198,9 @@ $prefixes = array('f_', 'a_', 'm_', 'u_');
foreach ($prefixes as $prefix)
{
$var = $prefix . 'permissions';
if (sizeof($$var))
if (sizeof(${$var}))
{
foreach ($$var as $auth_option => $l_ary)
foreach (${$var} as $auth_option => $l_ary)
{
$sql_ary = array(
'auth_option' => $auth_option,

View File

@ -466,7 +466,7 @@ class acp_profile
if (!$cp->vars[$key] && $action == 'edit')
{
$cp->vars[$key] = $$key;
$cp->vars[$key] = ${$key};
}
$field_data = $cp->vars;

View File

@ -78,7 +78,7 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
foreach ($sorts as $name => $sort_ary)
{
$key = $sort_ary['key'];
$selected = $$sort_ary['key'];
$selected = ${$sort_ary['key']};
// Check if the key is selectable. If not, we reset to the default or first key found.
// This ensures the values are always valid. We also set $sort_dir/sort_key/etc. to the
@ -87,12 +87,12 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
{
if ($sort_ary['default'] !== false)
{
$selected = $$key = $sort_ary['default'];
$selected = ${$key} = $sort_ary['default'];
}
else
{
@reset($sort_ary['options']);
$selected = $$key = key($sort_ary['options']);
$selected = ${$key} = key($sort_ary['options']);
}
}

View File

@ -504,7 +504,7 @@ class messenger
foreach ($address_ary as $which_ary)
{
$$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
${$type} .= ((${$type} != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
}
}

View File

@ -1418,9 +1418,9 @@ function rebuild_header($check_ary)
$_types = array('u', 'g');
foreach ($_types as $type)
{
if (sizeof($$type))
if (sizeof(${$type}))
{
foreach ($$type as $id)
foreach (${$type} as $id)
{
$address[$type][$id] = $check_type;
}

View File

@ -44,13 +44,13 @@ function user_get_id_name(&$user_id_ary, &$username_ary, $user_type = false)
$which_ary = ($user_id_ary) ? 'user_id_ary' : 'username_ary';
if ($$which_ary && !is_array($$which_ary))
if (${$which_ary} && !is_array(${$which_ary}))
{
$$which_ary = array($$which_ary);
${$which_ary} = array(${$which_ary});
}
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', $$which_ary) : array_map('utf8_clean_string', $$which_ary);
unset($$which_ary);
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', ${$which_ary}) : array_map('utf8_clean_string', ${$which_ary});
unset(${$which_ary});
$user_id_ary = $username_ary = array();

View File

@ -599,7 +599,7 @@ class install_convert extends module
'S_EXPLAIN' => $vars['explain'],
'S_LEGEND' => false,
'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], ${$config_key}, $options),
)
);
}