Req->Bug #54695 [Opn]: getColumnMeta() throws warning in silent mode

From: Date: Sun, 18 Sep 2016 18:41:36 +0000
Subject: Req->Bug #54695 [Opn]: getColumnMeta() throws warning in silent mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204117@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54695&edit=1 ID: 54695 Updated by: cmb@php.net Reported by: david at grudl dot com Summary: getColumnMeta() throws warning in silent mode Status: Open -Type: Feature/Change Request +Type: Bug Package: PDO related PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: > I read it that you are proposing to implement this function. In the description, the OP wrote: > PDO::ERRMODE_SILENT is not respected by > PDOStatement::getColumnMeta() So obviously, this is not about requesting support for PDOStatement::getColumnMeta() for the sqlite (not sqlite3 driver), but rather about the misbehaving of throwing a warning when the user requested silence. > I tend to say that's a valid and important warning. Sure. However, other warnings (e.g. for SQL parse errors) most certainly are important, too, but these are suppressed with PDO::ERRMODE_SILENT. So, in my opinion, this is clearly a bug. Previous Comments: ------------------------------------------------------------------------ [2011-05-09 17:33:49] uw@php.net I tend to say that's a valid and important warning. Not every PDO driver implements this function, see also http://de2.php.net/manual/en/pdostatement.getcolumnmeta.php . I read it that you are proposing to implement this function. Thus, changing from Bug Type "Bug" to "Feature/Change Request.". ------------------------------------------------------------------------ [2011-05-09 16:19:39] david at grudl dot com Description: ------------ PDO::ERRMODE_SILENT is not respected by PDOStatement::getColumnMeta() Test script: --------------- $pdo = new PDO('sqlite2:demo.db'); // SQLite does not support getColumnMeta $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $result = $pdo->query('SELECT * FROM users'); $result->getColumnMeta(1); Expected result: ---------------- no warning Actual result: -------------- Warning: PDOStatement::getColumnMeta() [pdostatement.getcolumnmeta]: SQLSTATE[IM001]: Driver does not support this function: driver doesn't support meta data ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54695&edit=1

« previous php.bugs (#204117) next »