Doc #63944 [Com]: PDOStatement::setFetchMode() returns bool, not integer

From: Date: Tue, 08 Jan 2013 21:38:24 +0000
Subject: Doc #63944 [Com]: PDOStatement::setFetchMode() returns bool, not integer
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9374@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 Comment by: niel dot archer at gmail dot com Reported by: benjamin dot morel at strictcoding dot co dot uk Summary: PDOStatement::setFetchMode() returns bool, not integer Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Patch in online editor Previous Comments: ------------------------------------------------------------------------ [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 (#9374) next »