[php-src] Issue #8004: Misleading PDO error message ‹Invalid datetime format›
| From: | kamil-tekiela | Date: | Wed, 26 Jan 2022 13:56:00 +0000 |
| Subject: | [php-src] Issue #8004: Misleading PDO error message ‹Invalid datetime format› | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239297@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8004
Comment Author: kamil-tekiela
Well, yeah it is, but that is exactly what the MySQL/MariaDB tells PDO:

If you check what is SQLSTATE 22007 you will see that it's "Invalid datetime format".
https://en.wikipedia.org/wiki/SQLSTATE
Not really sure what PHP could do about that. We just convey the same wrong information that the
database tells us.