Bug->Req #73852 [Opn]: Deprecate and remove PDO::PARAM_NULL

From: Date: Fri, 06 Jan 2017 18:34:06 +0000
Subject: Bug->Req #73852 [Opn]: Deprecate and remove PDO::PARAM_NULL
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206329@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73852&edit=1 ID: 73852 Updated by: cmb@php.net Reported by: dorin dot marcoci at gmail dot com Summary: Deprecate and remove PDO::PARAM_NULL Status: Open -Type: Bug +Type: Feature/Change Request Package: PDO Core PHP Version: Irrelevant Block user comment: N Private report: N New Comment: > 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>. Previous Comments: ------------------------------------------------------------------------ [2017-01-02 18:04:15] 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); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73852&edit=1

« previous php.bugs (#206329) next »