php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63944 PDOStatement::setFetchMode() returns bool, not integer
Submitted: 2013-01-08 17:30 UTC Modified: 2013-01-12 00:22 UTC
From: benjamin dot morel at strictcoding dot co dot uk Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2013-01-08 17:30 UTC] 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));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-08 21:38 UTC] niel dot archer at gmail dot com
Patch in online editor
 [2013-01-12 00:21 UTC] 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-12 00:22 UTC] frozenfire@php.net
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.


 [2013-01-12 00:22 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC