php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #35675 pg_execute changes the type of passed parameters
Submitted: 2005-12-15 02:14 UTC Modified: 2006-01-09 15:38 UTC
From: david at tulloh dot id dot au Assigned: helly (profile)
Status: Closed Package: Documentation problem
PHP Version: 5CVS, 4CVS (2005-12-19) (cvs) OS: *
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: david at tulloh dot id dot au
New email:
PHP Version: OS:

 

 [2005-12-15 02:14 UTC] david at tulloh dot id dot au
Description:
------------
pg_execute will change the type of a passed parameter into a string.

Reproduce code:
---------------
<?php
$i = 42;
var_dump($i);

pg_pconnect("insert connect details here");
@pg_execute('dummy_entry', array($i) );

var_dump($i);
?>


Expected result:
----------------
int(42)
int(42)


Actual result:
--------------
int(42)
string(2) "42"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-15 07:19 UTC] david at tulloh dot id dot au
work around until it's fixed and for older versions:

$type = gettype($i);
@pg_execute('dummy_entry', array($i) );
settype($i, $type);
 [2005-12-16 11:52 UTC] tony2001@php.net
Marcus, I don't think it can be fixed, but please take a look at it.
 [2006-01-09 15:38 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"Elements are converted to strings by calling this function."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 28 07:01:27 2024 UTC