aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-02-11 12:03:54 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-02-11 12:03:54 +0100
commit3df25babce5df2d26bc98114cd404d51c659c19f (patch)
tree16538bed8be122d00e0a015120453d3b357a0318 /phpBB/includes
parentc6a371531bab7ba7f003c57d25b6b515718eb54f (diff)
downloadforums-3df25babce5df2d26bc98114cd404d51c659c19f.tar
forums-3df25babce5df2d26bc98114cd404d51c659c19f.tar.gz
forums-3df25babce5df2d26bc98114cd404d51c659c19f.tar.bz2
forums-3df25babce5df2d26bc98114cd404d51c659c19f.tar.xz
forums-3df25babce5df2d26bc98114cd404d51c659c19f.zip
[ticket/13597] Modify variable-variable syntax to be compatible with PHP7
PHPBB3-13597
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_profile.php2
-rw-r--r--phpBB/includes/functions_content.php6
-rw-r--r--phpBB/includes/functions_messenger.php2
-rw-r--r--phpBB/includes/functions_privmsgs.php4
-rw-r--r--phpBB/includes/functions_user.php8
5 files changed, 11 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 046281596c..97c1f62077 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -460,7 +460,7 @@ class acp_profile
if (!$cp->vars[$key] && $action == 'edit')
{
- $cp->vars[$key] = $$key;
+ $cp->vars[$key] = ${$key};
}
$field_data = $cp->vars;
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 87cf34bd9d..6f861b8607 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -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']);
}
}
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 045e555d05..fbac3e6f1d 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -510,7 +510,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']);
}
}
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 838c6a0fec..e693305246 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1415,9 +1415,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;
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 83f6e44453..acf5649ed5 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -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();