ID: 45775
Updated by: [EMAIL PROTECTED]
Reported By: blue765d at aol dot com
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Debian Etch / Win32
PHP Version: 5.2.6
New Comment:
The PHP function names are 'urlencode' and 'urldecode', and both works
fine.
$pre = "++++";
$one = urlencode($pre);
$two = urldecode($one);
var_dump($one, $two);
string(12) "%2B%2B%2B%2B"
string(4) "++++"
Previous Comments:
------------------------------------------------------------------------
[2008-08-10 01:06:59] blue765d at aol dot com
Description:
------------
The 2 functions:
url_encode()
url_decode()
Do not encode and decode pluses ("+") correctly.
Reproduce code:
---------------
<?php
$pre = "++++";
$one = url_encode($pre);
$two = url_decode($one);
//Compare
if ($pre==$two)
echo "it worked!";
else
echo "It did not work.";
?>
Expected result:
----------------
it worked!
Actual result:
--------------
It did not work.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45775&edit=1