Index: branches/RC/core/kernel/utility/debugger.php
===================================================================
diff -u -r9688 -r10098
--- branches/RC/core/kernel/utility/debugger.php (.../debugger.php) (revision 9688)
+++ branches/RC/core/kernel/utility/debugger.php (.../debugger.php) (revision 10098)
@@ -446,8 +446,8 @@
default:
// number or string
- if (strlen($array) > 200) {
- $array = substr($array, 0, 50).' ...';
+ if (mb_strlen($array) > 200) {
+ $array = mb_substr($array, 0, 50).' ...';
}
return $array."\n";
break;
@@ -477,8 +477,8 @@
case 'integer':
case 'double':
case 'string':
- if (strlen($array[$key]) > 200) {
- $array[$key] = substr($array[$key], 0, 50).' ...';
+ if (mb_strlen($array[$key]) > 200) {
+ $array[$key] = mb_substr($array[$key], 0, 50).' ...';
}
$output .= $tabsign.'['.$key.'] = '.$array[$key]."\n";
break;
@@ -590,7 +590,7 @@
function isGecko()
{
// we need isset because we may run scripts from shell with no user_agent at all
- return isset($_SERVER['HTTP_USER_AGENT']) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'firefox') !== false;
+ return isset($_SERVER['HTTP_USER_AGENT']) && mb_strpos(mb_strtolower($_SERVER['HTTP_USER_AGENT']), 'firefox') !== false;
}
/**
@@ -718,7 +718,7 @@
$this->appendHTML('ScriptName: '.$this->getFileLink($script, 1, basename($script)).' ('.dirname($script).')');
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] == 'yes') {
- $this->appendHTML('RequestURI: '.$_SERVER['REQUEST_URI'].' (QS Length:'.strlen($_SERVER['QUERY_STRING']).')');
+ $this->appendHTML('RequestURI: '.$_SERVER['REQUEST_URI'].' (QS Length:'.mb_strlen($_SERVER['QUERY_STRING']).')');
}
$this->appendHTML('DomViewer: ');
@@ -1196,13 +1196,13 @@
unset($this->longErrors[$long_id]);
}
- if (strpos($errfile,'eval()\'d code') !== false) {
+ if (mb_strpos($errfile,'eval()\'d code') !== false) {
$errstr = '[EVAL, line '.$errline.']: '.$errstr;
$tmpStr = $errfile;
- $pos = strpos($tmpStr,'(');
- $errfile = substr($tmpStr, 0, $pos);
+ $pos = mb_strpos($tmpStr,'(');
+ $errfile = mb_substr($tmpStr, 0, $pos);
$pos++;
- $errline = substr($tmpStr,$pos,strpos($tmpStr,')',$pos)-$pos);
+ $errline = mb_substr($tmpStr,$pos,mb_strpos($tmpStr,')',$pos)-$pos);
}
$this->Data[] = Array('no' => $errno, 'str' => $errstr, 'file' => $errfile, 'line' => $errline, 'context' => $errcontext, 'debug_type' => 'error');