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
 [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 Apr 18 22:01:28 2024 UTC