Bug #68684 [NEW]: driver returns false for NULL DATETIME column
| From: | lm at zork dot pl | Date: | Mon, 29 Dec 2014 12:41:54 +0000 |
| Subject: | Bug #68684 [NEW]: driver returns false for NULL DATETIME column | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-189308@lists.php.net to get a copy of this message | ||
From: lm at zork dot pl
Operating system: All
PHP version: 5.6.4
Package: PDO MySQL
Bug Type: Bug
Bug description:driver returns false for NULL DATETIME column
Description:
------------
PDO mysql driver configured as in example returns false for DATETIME
column. VARCHARS, INT and other columns are returned properly (as php
null value).
Test script:
---------------
$db = new PDO($dsn, $db_user, $db_pass);
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//without this PDO returns all data as strings
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
--
Edit bug report at https://bugs.php.net/bug.php?id=68684&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68684&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68684&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68684&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68684&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68684&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68684&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68684&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68684&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68684&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68684&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68684&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68684&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68684&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68684&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68684&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68684&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68684&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68684&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68684&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68684&r=mysqlcfg