php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35694 PDO crashes when fetch mode is not valid
Submitted: 2005-12-15 23:03 UTC Modified: 2005-12-15 23:35 UTC
From: mrethers at ebcubes dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1.1 OS: Linux/Windows
Private report: No CVE-ID: None
 [2005-12-15 23:03 UTC] mrethers at ebcubes dot com
Description:
------------
The error message asks to report the bug so here it is ...

Reproduce code:
---------------
$stmt->setFetchMode(WHATEVER_NOT_PDO_CONSTANT)

Expected result:
----------------
I would expect a more helpfull message than Numeric value out of range, maybe cast an exception or something, with a unvalid fetch mode message

Actual result:
--------------
SQLSTATE[22003]: Numeric value out of range: unhandled mode; this is a PDO bug, please report it

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-15 23:06 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2005-12-15 23:18 UTC] mrethers at ebcubes dot com
No problem, it doesn't really bother, it's just a cosmetic change ...

Are the snapshot stable for a production environment ?
 [2005-12-15 23:29 UTC] tony2001@php.net
Snapshots are snapshots. 
You can use whatever you like in production if you know what you're doing.
IIRC I've fixed something similar after 5.1.1 release, please try the snapshot just to confirm it's fixed.
 [2005-12-15 23:35 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC