Bug #68684 [Opn->Csd]: driver returns false for NULL DATETIME column

From: Date: Fri, 09 Apr 2021 11:12:38 +0000
Subject: Bug #68684 [Opn->Csd]: driver returns false for NULL DATETIME column
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233338@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68684&edit=1 ID: 68684 Updated by: dharman@php.net Reported by: lm at zork dot pl Summary: driver returns false for NULL DATETIME column -Status: Open +Status: Closed Type: Bug Package: PDO MySQL Operating System: All PHP Version: 5.6.4 -Assigned To: +Assigned To: dharman Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2021-04-08 21:29:37] lm at zork dot pl No chance, sorry. My last php project was about six years ago :-) I think you can safely close this case. ------------------------------------------------------------------------ [2021-04-08 21:11:34] dharman@php.net Unfortunately, I can't reproduce it with any of the currently available PHP versions. If you are still encountering this issue with PHP 8 or even PHP 7.4 could you provide more details, please? If possible please create a test case that we can copy and paste. ------------------------------------------------------------------------ [2014-12-29 12:41:53] lm at zork dot pl 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 this bug report at https://bugs.php.net/bug.php?id=68684&edit=1

« previous php.bugs (#233338) next »