Bug #67704 [NEW]: CURLOPT_POSTFIELDS modify the type of param
| From: | redfoxli069 at gmail dot com | Date: | Tue, 29 Jul 2014 06:36:16 +0000 |
| Subject: | Bug #67704 [NEW]: CURLOPT_POSTFIELDS modify the type of param | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-186855@lists.php.net to get a copy of this message | ||
From: redfoxli069 at gmail dot com
Operating system: Linux
PHP version: 5.4.31
Package: cURL related
Bug Type: Bug
Bug description:CURLOPT_POSTFIELDS modify the type of param
Description:
------------
CURLOPT_POSTFIELDS modify the type of param
e.gï¼the type of $post_data['a'] from int to string it the "TEST
script"
Test script:
---------------
$ch = curl_init();
$post_data = array('a' => 1, 'b' => '2');
if($post_data['a'] === 1)
echo "yes\n";
else
echo "no\n";
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
if($post_data['a'] === 1)
echo "yes\n";
else
echo "no\n";
Expected result:
----------------
yes
yes
Actual result:
--------------
yes
no
--
Edit bug report at https://bugs.php.net/bug.php?id=67704&edit=1
--