Mantis - Quercus
Viewing Issue Advanced Details
5509 minor always 08-23-13 22:57 08-23-13 22:57
awebdeveloper  
 
normal  
new 4.0.36  
open  
none    
none  
0005509: PDO::ERRMODE_SILENT not honored
When passing the PDO::ERRMODE_SILENT option to a new PDO connection, this is not honored by Quercus. In modules/quercus/src/com/caucho/quercus/lib/db/PDO.java a PHP warning is given regardless of this setting. For example in methods getMysqlConnection and getPgsqlDataSource:

   env.warning(L.l("pdo dsn attribute not supported: {0}={1}", key, value));

The correct behaviour is specified in the PHP manual:
http://php.net/manual/en/pdo.error-handling.php [^]

"PDO::ERRMODE_SILENT

This is the default mode. PDO will simply set the error code for you to inspect using the PDO::errorCode() and PDO::errorInfo() methods on both the statement and database objects; if the error resulted from a call on a statement object, you would invoke the PDOStatement::errorCode() or PDOStatement::errorInfo() method on that object. If the error resulted from a call on the database object, you would invoke those methods on the database object instead."

There are no notes attached to this issue.