|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-01-02 18:04 UTC] dorin dot marcoci at gmail dot com
Description:
------------
NULL is a state, not a type or a value.
Using it as argument in bindValue or bindParam is a non-sense.
Nulls should be set like $stmt->bindValue('param', NULL, PDO::PARAM_INT);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 18:00:01 2025 UTC |
> Nulls should be set like $stmt->bindValue('param', NULL, > PDO::PARAM_INT); As PHP is a loosely typed language, I would expect that to bind 0 (zero) to :param. Anyhow, having PDO::PARAM_NULL is not a bug per se, and deprecating and removing it would almost certainly require an RFC, see <https://wiki.php.net/rfc/howto>.