[php-src] Issue #8004: Misleading PDO error message ‹Invalid datetime format›

From: Date: Wed, 26 Jan 2022 14:58:01 +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-239299@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8004 Comment Author: kamil-tekiela > Error numbers appear to be the same (1366 and 22007), but how come that the error message is > different? I'm not sure what you mean. The messages are the same. It's just that PDO maps the SQLSTATE code additionally to its textual representation which makes the exception message be >SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column >test.test.false Compare it to what MySQL console says: >ERROR 1366 (22007): Incorrect integer value: '' for column >test4‡0‰²!¡´ 3è*à >Ú.test.false It's the same message and same code.

« previous php.bugs (#239299) next »