Doc #63944 [Opn->Csd]: PDOStatement::setFetchMode() returns bool, not integer

From: Date: Sat, 12 Jan 2013 00:22:12 +0000
Subject: Doc #63944 [Opn->Csd]: PDOStatement::setFetchMode() returns bool, not integer
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9382@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63944&edit=1 ID: 63944 Updated by: frozenfire@php.net Reported by: benjamin dot morel at strictcoding dot co dot uk Summary: PDOStatement::setFetchMode() returns bool, not integer -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: frozenfire Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2013-01-12 00:21:59] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&revision=329087 Log: Changed return value to &return.success;, as returns 1 on success no longer would seem to apply. Closes bug #63944. ------------------------------------------------------------------------ [2013-01-08 21:38:24] niel dot archer at gmail dot com Patch in online editor ------------------------------------------------------------------------ [2013-01-08 17:30:15] benjamin dot morel at strictcoding dot co dot uk Description: ------------ Although setFetchMode() is properly documented as returning bool: http://php.net/manual/en/pdostatement.setfetchmode.php The documentation says on the same page: "Returns 1 on success or FALSE on failure." The sample code below confirms that it's always returning a boolean, not an integer. The documentation should then be changed to: "Returns TRUE on success or FALSE on failure." Test script: --------------- $pdo = new PDO('sqlite::memory:'); $st = $pdo->query('SELECT * FROM sqlite_master'); var_export($st->setFetchMode(PDO::FETCH_NUM)); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63944&edit=1

« previous php.doc.bugs (#9382) next »