|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-10-02 07:40 UTC] mike@php.net
-Assigned To:
+Assigned To: yohgaki
[2013-10-02 07:40 UTC] mike@php.net
[2013-10-03 20:27 UTC] yohgaki@php.net
[2013-11-28 16:34 UTC] derick@php.net
[2013-11-28 16:34 UTC] derick@php.net
-Status: Assigned
+Status: Closed
[2013-11-28 16:34 UTC] derick@php.net
[2013-11-28 16:34 UTC] derick@php.net
[2013-11-28 16:34 UTC] derick@php.net
[2013-11-28 16:35 UTC] mike@php.net
-Status: Closed
+Status: Assigned
[2013-11-28 16:35 UTC] mike@php.net
[2013-11-28 16:49 UTC] ab@php.net
[2013-11-28 16:49 UTC] ab@php.net
-Status: Assigned
+Status: Closed
[2013-11-28 17:42 UTC] mike@php.net
-Status: Closed
+Status: Assigned
[2013-11-28 17:42 UTC] mike@php.net
[2014-10-07 23:16 UTC] stas@php.net
[2014-10-07 23:16 UTC] stas@php.net
-Status: Assigned
+Status: Closed
[2014-10-07 23:25 UTC] stas@php.net
-Status: Closed
+Status: Re-Opened
[2014-10-07 23:27 UTC] stas@php.net
[2014-10-07 23:27 UTC] stas@php.net
-Status: Re-Opened
+Status: Closed
[2014-10-08 09:00 UTC] thuejk at gmail dot com
-Status: Closed
+Status: Assigned
[2014-10-08 09:00 UTC] thuejk at gmail dot com
[2015-02-03 06:43 UTC] yohgaki@php.net
[2015-02-03 06:43 UTC] yohgaki@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
Description: ------------ The variable holding the array of values I pass to pg_copy_from() is modified by pg_copy_from() (ints are changed to strings). Even though there is no pass-by- reference involved. This bug also exists in PHP 5.2 at least. Test script: --------------- <?php function test(Array $values) { $params = sprintf("host='%s' dbname='%s' user='%s' password='%s'", "localhost", "thue", "thue", "password"); $connection = pg_pconnect($params, PGSQL_CONNECT_FORCE_NEW); pg_query("begin"); pg_query("CREATE TABLE test(i INTEGER)"); pg_copy_from($connection, "test", $values, "\t", "NULL"); pg_query("rollback"); } $values = Array(1,2,3); var_dump($values); test($values); var_dump($values); ?> Expected result: ---------------- The two var_dump()s should return identical outputs. Actual result: -------------- t@t ~/php/php-5.5.0> ./sapi/cli/php ~/test.php array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } array(3) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" }