diff --git a/upload/install/index.php b/upload/install/index.php
index 25dfac110e2ff4e104c09687e27671ed11868936..3ed247c84988731d5427abce99c96f2d0429b978 100644
--- a/upload/install/index.php
+++ b/upload/install/index.php
@@ -321,7 +321,7 @@ if($method == 'show_license') {
}
}
- if(strpos($tablepre, '.') !== false || intval($tablepre{0})) {
+ if(strpos($tablepre, '.') !== false || intval($tablepre[0])) {
show_msg('tablepre_invalid', $tablepre, 0);
}
diff --git a/upload/source/class/discuz/discuz_database.php b/upload/source/class/discuz/discuz_database.php
index afeb323aba8e2693ea250fd7a301fa3b109622be..4c273ee0cbc6d55e26cca4089b17fb3aeccb016e 100644
--- a/upload/source/class/discuz/discuz_database.php
+++ b/upload/source/class/discuz/discuz_database.php
@@ -307,8 +307,8 @@ class discuz_database {
$i = $find = 0;
$ret = '';
while ($i <= $len && $find < $count) {
- if ($sql{$i} == '%') {
- $next = $sql{$i + 1};
+ if ($sql[$i] == '%') {
+ $next = $sql[$i + 1];
if ($next == 't') {
$ret .= self::table($arg[$find]);
} elseif ($next == 's') {
@@ -331,7 +331,7 @@ class discuz_database {
$i++;
$find++;
} else {
- $ret .= $sql{$i};
+ $ret .= $sql[$i];
}
$i++;
}
diff --git a/upload/source/function/function_admincp.php b/upload/source/function/function_admincp.php
index 8e659ac87d38b080186c930edaa0c693e24c98c9..7551eadf3a6d47f268dbe9dab09b999fb9b1fd7e 100644
--- a/upload/source/function/function_admincp.php
+++ b/upload/source/function/function_admincp.php
@@ -667,7 +667,7 @@ function showsetting($setname, $varname, $value, $type = 'radio', $disabled = ''
$s .= '
';
foreach($varname[1] as $key => $var) {
if($var !== false) {
- $s .= '- '.$var.'
';
+ $s .= '- '.$var.'
';
}
$i++;
}
@@ -705,7 +705,7 @@ function showsetting($setname, $varname, $value, $type = 'radio', $disabled = ''
$css = '';
for($i = 0; $i <= 1; $i++) {
if($code[$i] != '') {
- if($code[$i]{0} == '#') {
+ if($code[$i][0] == '#') {
$css .= strtoupper($code[$i]).' ';
} elseif(preg_match('/^(https?:)?\/\//i', $code[$i])) {
$css .= 'url(\''.$code[$i].'\') ';
diff --git a/upload/source/function/function_core.php b/upload/source/function/function_core.php
index fe75e631188b0103ef5a07ea696270628ed71056..05fe24262b26d1ba6b4fa150cd0043bbe046d4e3 100644
--- a/upload/source/function/function_core.php
+++ b/upload/source/function/function_core.php
@@ -381,7 +381,7 @@ function random($length, $numeric = 0) {
}
$max = strlen($seed) - 1;
for($i = 0; $i < $length; $i++) {
- $hash .= $seed{mt_rand(0, $max)};
+ $hash .= $seed[mt_rand(0, $max)];
}
return $hash;
}
@@ -1903,7 +1903,7 @@ function getexpiration() {
}
function return_bytes($val) {
- $last = strtolower($val{strlen($val)-1});
+ $last = strtolower($val[strlen($val)-1]);
if (!is_numeric($val)) {
$val = substr(trim($val), 0, -1);
}
@@ -1951,7 +1951,7 @@ function getattachtablebyaid($aid) {
function getattachtableid($tid) {
$tid = (string)$tid;
- return intval($tid{strlen($tid)-1});
+ return intval($tid[strlen($tid)-1]);
}
function getattachtablebytid($tid) {
diff --git a/upload/source/function/function_misc.php b/upload/source/function/function_misc.php
index 29f7168894cf5b159d28b2e1d0c658fb86ccb4a7..f99a012a4f82acb86cf1fb712cb5ba31ae61c70d 100644
--- a/upload/source/function/function_misc.php
+++ b/upload/source/function/function_misc.php
@@ -60,9 +60,9 @@ function convertip_tiny($ip, $ipdatafile) {
for ($start = $start['len'] * 8 + 1024; $start < $length; $start += 8) {
- if ($index{$start} . $index{$start + 1} . $index{$start + 2} . $index{$start + 3} >= $ip) {
- $index_offset = @unpack('Vlen', $index{$start + 4} . $index{$start + 5} . $index{$start + 6} . "\x0");
- $index_length = @unpack('Clen', $index{$start + 7});
+ if ($index[$start] . $index[$start + 1] . $index[$start + 2] . $index[$start + 3] >= $ip) {
+ $index_offset = @unpack('Vlen', $index[$start + 4] . $index[$start + 5] . $index[$start + 6] . "\x0");
+ $index_length = @unpack('Clen', $index[$start + 7]);
break;
}
}
diff --git a/upload/source/plugin/mobile/mobile.class.php b/upload/source/plugin/mobile/mobile.class.php
index 2ad3a11c80f28b56bf258fa8c87a279e22207609..0331fa7198d500aae3ce6035d9a0ed7c0dbf61f3 100644
--- a/upload/source/plugin/mobile/mobile.class.php
+++ b/upload/source/plugin/mobile/mobile.class.php
@@ -56,7 +56,7 @@ class mobile_core {
$return = array();
foreach($variables as $key => $value) {
foreach($keys as $k) {
- if($k{0} == '/' && preg_match($k, $key) || $key == $k) {
+ if($k[0] == '/' && preg_match($k, $key) || $key == $k) {
if($subkeys) {
$return[$key] = mobile_core::getvalues($value, $subkeys);
} else {
diff --git a/upload/uc_client/client.php b/upload/uc_client/client.php
index 3ae06fbf934ebd2d3018be273895c4bd3d57fdc5..0f97d1a31e88febebc4e4a94dfbff75ed208fbc2 100644
--- a/upload/uc_client/client.php
+++ b/upload/uc_client/client.php
@@ -143,7 +143,7 @@ function uc_api_mysql($model, $action, $args=array()) {
include_once UC_ROOT."./control/$model.php";
eval("\$uc_controls['$model'] = new {$model}control();");
}
- if($action{0} != '_') {
+ if($action[0] != '_') {
$args = uc_addslashes($args, 1, TRUE);
$action = 'on'.$action;
$uc_controls[$model]->input = $args;
diff --git a/utility/convert/include/editor.func.php b/utility/convert/include/editor.func.php
index 676ad7d71b8f0a4dbb4e668e6329a9bc97dd397d..6af6f8de361afaaf2d6a23a25898124f89559013 100644
--- a/utility/convert/include/editor.func.php
+++ b/utility/convert/include/editor.func.php
@@ -9,7 +9,7 @@
function absoluteurl($url) {
global $_G;
- if($url{0} == '/') {
+ if($url[0] == '/') {
return 'http://'.$_SERVER['HTTP_HOST'].$url;
} else {
return $_G['siteurl'].$url;
@@ -59,9 +59,9 @@ function divtag($divoptions, $text) {
function fetchoptionvalue($option, $text) {
if(($position = strpos($text, $option)) !== false) {
$delimiter = $position + strlen($option);
- if($text{$delimiter} == '"') {
+ if($text[$delimiter] == '"') {
$delimchar = '"';
- } elseif($text{$delimiter} == '\'') {
+ } elseif($text[$delimiter] == '\'') {
$delimchar = '\'';
} else {
$delimchar = ' ';
@@ -291,7 +291,7 @@ function recursion($tagname, $text, $function, $extraargs = '') {
$found = FALSE;
$tagnameend = FALSE;
for($optionend = $tagbegin; $optionend <= $strlen; $optionend++) {
- $char = $text{$optionend};
+ $char = $text[$optionend];
if(($char == '"' || $char == "'") && $inquote == '') {
$inquote = $char;
} elseif(($char == '"' || $char == "'") && $inquote == $char) {
diff --git a/utility/convert/source/d7.2_x2.0/table/threadsattachments.php b/utility/convert/source/d7.2_x2.0/table/threadsattachments.php
index f5c60f1940eec536de91ba0066099d6ea0b2831a..dc8e6f3a0b36ecb573d6b8d89a87772856b3c53b 100644
--- a/utility/convert/source/d7.2_x2.0/table/threadsattachments.php
+++ b/utility/convert/source/d7.2_x2.0/table/threadsattachments.php
@@ -38,7 +38,7 @@ while ($row = $db_source->fetch_array($query)) {
$row = daddslashes($row, 1);
$tid = (string)$row['tid'];
- $tableid = $tid{strlen($tid)-1};
+ $tableid = $tid[strlen($tid)-1];
$table_target_attachment_tableid = $db_target->tablepre.'forum_attachment_'.$tableid;
$db_target->query("REPLACE INTO $table_target SET aid='$row[aid]', tid='$row[tid]', pid='$row[pid]', uid='$row[uid]', tableid='$tableid', downloads='$row[downloads]'");
$db_target->query("REPLACE INTO $table_target_attachment_tableid SET