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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Mar 28 21:01:27 2024 UTC