// Fix a little bug on PDO

This commit is contained in:
rMalie
2011-12-06 09:04:40 +00:00
parent 8c8b6efbdc
commit 9a47deab89
+2 -2
View File
@@ -109,7 +109,7 @@ class DbPDOCore extends Db
public function getMsgError($query = false) public function getMsgError($query = false)
{ {
$error = $this->link->errorInfo(); $error = $this->link->errorInfo();
return $error[2]; return ($error[0] == '00000') ? '' : $error[2];
} }
/** /**
@@ -118,7 +118,7 @@ class DbPDOCore extends Db
public function getNumberError() public function getNumberError()
{ {
$error = $this->link->errorInfo(); $error = $this->link->errorInfo();
return $error[1]; return isset($error[1]) ? $error[1] : 0;
} }
/** /**