php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64334 bindParam() does not requre colon for parameter
Submitted: 2013-03-02 00:19 UTC Modified: 2013-03-02 17:00 UTC
From: shri dot amin at gmail dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.3.22 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shri dot amin at gmail dot com
New email:
PHP Version: OS:

 

 [2013-03-02 00:19 UTC] shri dot amin at gmail dot com
Description:
------------
the bindParam($param, $var) PDO function does not require the colon(:) for the param.



Test script:
---------------
$stmt = $dbh->prepare("INSERT INTO foo VALUES (:email, :password)");
$stmt->bindParam('email', $_POST['email']); //this works, but shouldn't
$stmt->bindParam('password', $_POST['password']); //this works, but shouldn't




Expected result:
----------------
obviously the first param of bindParam() should require the colon(:) 

Actual result:
--------------
the first param of bindParam() does not require the colon(:)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-02 08:35 UTC] jellofishi at gmail dot com
Why is this a bug ? if the functionality works, shouldn't the documentation be 
updated ?
 [2013-03-02 17:00 UTC] shri dot amin at gmail dot com
-Status: Open +Status: Closed
 [2013-03-02 17:00 UTC] shri dot amin at gmail dot com
ok fine close out
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 14:01:29 2024 UTC