Fixed some minor bugs
This commit is contained in:
parent
ca9abd7374
commit
26141db6fe
@ -76,7 +76,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection {
|
|||||||
* @return string quoted identifier string
|
* @return string quoted identifier string
|
||||||
*/
|
*/
|
||||||
public function quoteIdentifier($identifier, $checkOption = false) {
|
public function quoteIdentifier($identifier, $checkOption = false) {
|
||||||
if ($check_option && ! $this->options['quote_identifier']) {
|
if ($checkOption && ! $this->options['quote_identifier']) {
|
||||||
return $identifier;
|
return $identifier;
|
||||||
}
|
}
|
||||||
return '[' . str_replace(']', ']]', $identifier) . ']';
|
return '[' . str_replace(']', ']]', $identifier) . ']';
|
||||||
|
@ -64,9 +64,10 @@ class Doctrine_Connection_Mssql_Exception extends Doctrine_Connection_Exception
|
|||||||
*/
|
*/
|
||||||
public function processErrorInfo(array $errorInfo) {
|
public function processErrorInfo(array $errorInfo) {
|
||||||
$code = $errorInfo[1];
|
$code = $errorInfo[1];
|
||||||
if(isset(self::$errorCodeMap[$code]))
|
if(isset(self::$errorCodeMap[$code])) {
|
||||||
$errorInfo[3] = self::$errorCodeMap[$code];
|
$this->portableCode = self::$errorCodeMap[$code];
|
||||||
|
return true;
|
||||||
return $errorInfo;
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,14 +61,17 @@ class Doctrine_Connection_Oracle_Exception extends Doctrine_Connection_Exception
|
|||||||
* converted into a portable code and then adds this
|
* converted into a portable code and then adds this
|
||||||
* portable error code to $portableCode field
|
* portable error code to $portableCode field
|
||||||
*
|
*
|
||||||
* the portable error code is added at the end of array
|
|
||||||
*
|
|
||||||
* @param array $errorInfo error info array
|
* @param array $errorInfo error info array
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
|
* @return boolean whether or not the error info processing was successfull
|
||||||
|
* (the process is successfull if portable error code was found)
|
||||||
*/
|
*/
|
||||||
public function processErrorInfo(array $errorInfo) {
|
public function processErrorInfo(array $errorInfo) {
|
||||||
$code = $errorInfo[1];
|
$code = $errorInfo[1];
|
||||||
if(isset(self::$errorCodeMap[$code]))
|
if(isset(self::$errorCodeMap[$code])) {
|
||||||
$this->portableCode = self::$errorCodeMap[$code];
|
$this->portableCode = self::$errorCodeMap[$code];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user