diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-01-15 07:14:14 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-01-15 07:14:14 +0000 |
commit | 2e9bbda79198879adba89eda98e4a4867d9d3cd9 (patch) | |
tree | 3aebddf5e83e94737c5891978c5443c3ccae77c2 /includes | |
parent | 3329ad927c93b86587ec6ef3b7804ddcf1948384 (diff) | |
download | brdo-2e9bbda79198879adba89eda98e4a4867d9d3cd9.tar.gz brdo-2e9bbda79198879adba89eda98e4a4867d9d3cd9.tar.bz2 |
- #44772: {} -> [] (in anticipation of PHP de-deprecation)
Diffstat (limited to 'includes')
-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 |
4 files changed, 22 insertions, 22 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++; } |