X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fplbacktrace.php;h=29685121fcb8a5bfe8c08ebfce71a848516c3fc5;hb=c504af53e5b3e13f19039f1ab03cd16279ce4967;hp=89703aaa0fcc3ee7c0be270f4aea8620d955501f;hpb=d36e55a1b669fb99a248a5032659bfe67948f84c;p=platal.git diff --git a/classes/plbacktrace.php b/classes/plbacktrace.php index 89703aa..2968512 100644 --- a/classes/plbacktrace.php +++ b/classes/plbacktrace.php @@ -1,6 +1,6 @@ fixCharset($entry['action']); unset($entry['action']); $trace['exectime'] = @$entry[$timef]; $this->totaltime += $trace['exectime']; unset($entry[$timef]); $trace['rows'] = @$entry[$sizef]; unset($entry[$sizef]); - $trace['error'] = @$entry[$errorf]; + $trace['error'] = $this->fixCharset(@$entry[$errorf]); unset($entry[$errorf]); if ($trace['error']) { $this->error = true; } - $trace['data'] = array($entry); + $trace['data'] = array($this->fixCharset($entry)); $this->traces[] =& $trace; } public function newEvent($action, $rows = 0, $error = null, array $userdata = array()) { - $trace = array('action' => $action, 'time' => 0); + $trace = array('action' => $this->fixCharset($action), 'time' => 0); $this->traces[] =& $trace; $this->update($rows, $error, $userdata); } public function start($action) { - $this->traces[] = array('action' => $action, 'starttime' => microtime(true));; + $this->traces[] = array('action' => $this->fixCharset($action), 'starttime' => microtime(true));; } public function stop($rows = 0, $error = null, array $userdata = array()) @@ -85,7 +94,8 @@ class PlBacktrace { $trace =& $this->traces[count($this->traces) - 1]; $trace['rows'] = $rows; - $trace['error'] = $error; + $trace['error'] = $this->fixCharset($error); + array_walk_recursive($userdata, array($this, 'fixCharset')); $trace['data'] = $userdata; if ($trace['error']) { $this->error = true;