diff options
-rw-r--r-- | includes/common.inc | 2 | ||||
-rw-r--r-- | includes/form.inc | 4 | ||||
-rw-r--r-- | includes/locale.inc | 22 | ||||
-rw-r--r-- | includes/unicode.inc | 16 | ||||
-rw-r--r-- | modules/filter.module | 2 | ||||
-rw-r--r-- | modules/filter/filter.module | 2 | ||||
-rw-r--r-- | modules/search.module | 2 | ||||
-rw-r--r-- | modules/search/search.module | 2 |
8 files changed, 26 insertions, 26 deletions
diff --git a/includes/common.inc b/includes/common.inc index 3d54d902e..2eb3693da 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -857,7 +857,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL $max = strlen($format); $date = ''; for ($i = 0; $i < $max; $i++) { - $c = $format{$i}; + $c = $format[$i]; if (strpos('AaDFlM', $c) !== false) { $date .= t(gmdate($c, $timestamp)); } diff --git a/includes/form.inc b/includes/form.inc index 16a465266..174f68432 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -19,7 +19,7 @@ * Check if the key is a property. */ function element_property($key) { - return $key{0} == '#'; + return $key[0] == '#'; } function element_properties($element) { @@ -30,7 +30,7 @@ function element_properties($element) { * Check if the key is a child. */ function element_child($key) { - return $key{0} != '#'; + return $key[0] != '#'; } function element_children($element) { diff --git a/includes/locale.inc b/includes/locale.inc index c158e868d..bafe1105f 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -606,29 +606,29 @@ function _locale_import_tokenize_formula($formula) { $formula = str_replace(" ", "", $formula); $tokens = array(); for ($i = 0; $i < strlen($formula); $i++) { - if (is_numeric($formula{$i})) { - $num = $formula{$i}; + if (is_numeric($formula[$i])) { + $num = $formula[$i]; $j = $i + 1; - while($j < strlen($formula) && is_numeric($formula{$j})) { - $num .= $formula{$j}; + while($j < strlen($formula) && is_numeric($formula[$j])) { + $num .= $formula[$j]; $j++; } $i = $j - 1; $tokens[] = $num; } - elseif ($pos = strpos(" =<>!&|", $formula{$i})) { // We won't have a space - $next = $formula{($i+1)}; + elseif ($pos = strpos(" =<>!&|", $formula[$i])) { // We won't have a space + $next = $formula[$i + 1]; switch ($pos) { case 1: case 2: case 3: case 4: if ($next == '=') { - $tokens[] = $formula{$i} .'='; + $tokens[] = $formula[$i] .'='; $i++; } else { - $tokens[] = $formula{$i}; + $tokens[] = $formula[$i]; } break; case 5: @@ -637,7 +637,7 @@ function _locale_import_tokenize_formula($formula) { $i++; } else { - $tokens[] = $formula{$i}; + $tokens[] = $formula[$i]; } break; case 6: @@ -646,13 +646,13 @@ function _locale_import_tokenize_formula($formula) { $i++; } else { - $tokens[] = $formula{$i}; + $tokens[] = $formula[$i]; } break; } } else { - $tokens[] = $formula{$i}; + $tokens[] = $formula[$i]; } } return $tokens; diff --git a/includes/unicode.inc b/includes/unicode.inc index f0e302343..7aa0b942a 100644 --- a/includes/unicode.inc +++ b/includes/unicode.inc @@ -193,12 +193,12 @@ function truncate_utf8($string, $len, $wordsafe = FALSE, $dots = FALSE) { return $string; } if ($wordsafe) { - while (($string{--$len} != ' ') && ($len > 0)) {}; + while (($string[--$len] != ' ') && ($len > 0)) {}; } - if ((ord($string{$len}) < 0x80) || (ord($string{$len}) >= 0xC0)) { + if ((ord($string[$len]) < 0x80) || (ord($string[$len]) >= 0xC0)) { return substr($string, 0, $len) . ($dots ? ' ...' : ''); } - while (ord($string{--$len}) < 0xC0) {}; + while (ord($string[--$len]) < 0xC0) {}; return substr($string, 0, $len) . ($dots ? ' ...' : ''); } @@ -389,7 +389,7 @@ function drupal_strtolower($text) { * Used for flipping U+C0-U+DE to U+E0-U+FD and back. */ function _unicode_caseflip($matches) { - return $matches[0]{0} . chr(ord($matches[0]{1}) ^ 32); + return $matches[0][0] . chr(ord($matches[0][1]) ^ 32); } /** @@ -422,7 +422,7 @@ function drupal_substr($text, $start, $length = NULL) { $bytes = -1; $chars = -1; while ($bytes < $strlen && $chars < $start) { $bytes++; - $c = ord($text{$bytes}); + $c = ord($text[$bytes]); if ($c < 0x80 || $c >= 0xC0) { $chars++; } @@ -435,7 +435,7 @@ function drupal_substr($text, $start, $length = NULL) { $bytes = $strlen; $chars = 0; while ($bytes > 0 && $chars < $start) { $bytes--; - $c = ord($text{$bytes}); + $c = ord($text[$bytes]); if ($c < 0x80 || $c >= 0xC0) { $chars++; } @@ -453,7 +453,7 @@ function drupal_substr($text, $start, $length = NULL) { $bytes = $istart; $chars = 0; while ($bytes < $strlen && $chars < $length) { $bytes++; - $c = ord($text{$bytes}); + $c = ord($text[$bytes]); if ($c < 0x80 || $c >= 0xC0) { $chars++; } @@ -466,7 +466,7 @@ function drupal_substr($text, $start, $length = NULL) { $length = abs($length); $bytes = $strlen - 1; $chars = 0; while ($bytes >= 0 && $chars < $length) { - $c = ord($text{$bytes}); + $c = ord($text[$bytes]); if ($c < 0x80 || $c >= 0xC0) { $chars++; } diff --git a/modules/filter.module b/modules/filter.module index 61743dc71..75ecff13d 100644 --- a/modules/filter.module +++ b/modules/filter.module @@ -1004,7 +1004,7 @@ function _filter_autop($text) { foreach ($chunks as $i => $chunk) { if ($i % 2) { // Opening or closing tag? - $open = ($chunk{1} != '/'); + $open = ($chunk[1] != '/'); list($tag) = split('[ >]', substr($chunk, 2 - $open), 2); if (!$ignore) { if ($open) { diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 61743dc71..75ecff13d 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -1004,7 +1004,7 @@ function _filter_autop($text) { foreach ($chunks as $i => $chunk) { if ($i % 2) { // Opening or closing tag? - $open = ($chunk{1} != '/'); + $open = ($chunk[1] != '/'); list($tag) = split('[ >]', substr($chunk, 2 - $open), 2); if (!$ignore) { if ($open) { diff --git a/modules/search.module b/modules/search.module index 1401e2420..e8294107d 100644 --- a/modules/search.module +++ b/modules/search.module @@ -482,7 +482,7 @@ function search_index($sid, $type, $text) { list($tagname) = explode(' ', $value, 2); $tagname = drupal_strtolower($tagname); // Closing or opening tag? - if ($tagname{0} == '/') { + if ($tagname[0] == '/') { $tagname = substr($tagname, 1); // If we encounter unexpected tags, reset score to avoid incorrect boosting. if (!count($tagstack) || $tagstack[0] != $tagname) { diff --git a/modules/search/search.module b/modules/search/search.module index 1401e2420..e8294107d 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -482,7 +482,7 @@ function search_index($sid, $type, $text) { list($tagname) = explode(' ', $value, 2); $tagname = drupal_strtolower($tagname); // Closing or opening tag? - if ($tagname{0} == '/') { + if ($tagname[0] == '/') { $tagname = substr($tagname, 1); // If we encounter unexpected tags, reset score to avoid incorrect boosting. if (!count($tagstack) || $tagstack[0] != $tagname) { |