#49614 [NEW]: PDOStatement::execute assumes string values in array
| From: | sjoerd-php at linuxonly dot nl | Date: | Mon, 21 Sep 2009 19:15:44 +0000 |
| Subject: | #49614 [NEW]: PDOStatement::execute assumes string values in array | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-2799@lists.php.net to get a copy of this message | ||
From: sjoerd-php at linuxonly dot nl
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: PDOStatement::execute assumes string values in array
Description:
------------
The PDOStatement->execute() method takes an array with parameters. This
array is assumed to contain string values, but this is not documented.
The values in the array are bound to the statement with PDO_PARAM_STR
(according to pdo_stmt.c:470). This should be clarified in the
documentation. The documentation already mentions that PDO_PARAM_STR is the
default in bindParam(), but it should me mentioned again in the
documentation of execute().
This causes confusion when people try to insert other things, especialy
booleans:
Bug #44597: Postgres driver does not prepare booleans correctly
Bug #49255: PDO fails to insert boolean FALSE to MySQL in prepared
statement
--
Edit bug report at http://bugs.php.net/?id=49614&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49614&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49614&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49614&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49614&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49614&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49614&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49614&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49614&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49614&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49614&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49614&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49614&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49614&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49614&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49614&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49614&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49614&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49614&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49614&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49614&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49614&r=mysqlcfg