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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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 00:01:30 2024 UTC