Skip to content

Commit

Permalink
fixed notices, the last one is quite hacky :-(
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Mar 8, 2006
1 parent 330388c commit acc2608
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/typo3/class.t3lib_cs.php
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,7 @@ function initUnicodeData($mode=null) {
// Only process if the tables are not yet loaded
switch($mode) {
case 'case':
if (is_array($this->caseFolding['utf-8'])) return 1;

if (!empty($this->caseFolding['utf-8']) && is_array($this->caseFolding['utf-8'])) return 1; //dirty skodak's hack to get rid of the warning
// Use cached version if possible
if ($cacheFileCase && @is_file($cacheFileCase)) {
$this->caseFolding['utf-8'] = unserialize(t3lib_div::getUrl($cacheFileCase));
Expand All @@ -1005,7 +1004,7 @@ function initUnicodeData($mode=null) {
break;

case 'ascii':
if (is_array($this->toASCII['utf-8'])) return 1;
if (!empty($this->toASCII['utf-8']) && is_array($this->toASCII['utf-8'])) return 1; //dirty skodak's hack to get rid of the warning

// Use cached version if possible
if ($cacheFileASCII && @is_file($cacheFileASCII)) {
Expand Down Expand Up @@ -1840,7 +1839,8 @@ function utf8_char_mapping($str,$mode,$opt='') {
return $str;
}

for($i=0; strlen($str{$i}); $i++) {
$length = strlen($str); //dirty skodak's hack to get rid of the warning
for($i=0; $i<$length && strlen($str{$i}); $i++) {
$c = ord($str{$i});
if (!($c & 0x80)) // single-byte (0xxxxxx)
$mbc = $str{$i};
Expand Down

0 comments on commit acc2608

Please sign in to comment.