note 126827 added to pdostatement.bindparam
| From: | jcastromail.yahoo.es via php-notes | Date: | Fri, 04 Feb 2022 14:20:02 +0000 |
| Subject: | note 126827 added to pdostatement.bindparam | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217580@lists.php.net to get a copy of this message | ||
PHP 8.1 changed the way how this method works.
Now, the fourth method must not be null. It could be 0 (for an int) but it could not be null,
otherwise, it will raise a deprecated warning.
old:
$sth->bindParam('calories', $calories, PDO::PARAM_INT);
new:
$sth->bindParam('calories', $calories, PDO::PARAM_INT,0);
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 190.46.238.9)
----
Manual Page -- https://php.net/manual/en/pdostatement.bindparam.php
Edit -- https://main.php.net/note/edit/126827
Del: integrated -- https://main.php.net/note/delete/126827/integrated
Del: useless -- https://main.php.net/note/delete/126827/useless
Del: bad code -- https://main.php.net/note/delete/126827/bad+code
Del: spam -- https://main.php.net/note/delete/126827/spam
Del: non-english -- https://main.php.net/note/delete/126827/non-english
Del: in docs -- https://main.php.net/note/delete/126827/in+docs
Del: other reasons-- https://main.php.net/note/delete/126827
Reject -- https://main.php.net/note/reject/126827
Search -- https://main.php.net/manage/user-notes.php