When encoding of error string is not UTF-8, there was a trouble to read. This revision fixes the encoding trouble and refines code related to error displaying on database class file.

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6905 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2009-10-31 14:30:03 +00:00
parent babc377eb7
commit d19d647926

View file

@ -226,6 +226,7 @@
* @return object of error
**/
function getError() {
$this->errstr = Context::convertEncodingStr($this->errstr);
return new Object($this->errno, $this->errstr);
}
@ -326,7 +327,7 @@
break;
}
if($this->errno != 0 ) $output = new Object($this->errno, $this->errstr);
if($this->isError()) $output = $this->getError();
else if(!is_a($output, 'Object') && !is_subclass_of($output, 'Object')) $output = new Object();
$output->add('_query', $this->query);
$output->add('_elapsed_time', sprintf("%0.5f", $this->elapsed_time));