#32750 [NEW]: pg_escape_string removes some backslashes
| From: | master-bx at users dot sourceforge dot net | Date: | Mon, 18 Apr 2005 19:42:37 +0000 |
| Subject: | #32750 [NEW]: pg_escape_string removes some backslashes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-77819@lists.php.net to get a copy of this message | ||
From: master-bx at users dot sourceforge dot net
Operating system: Windows XP SP2
PHP version: 5.0.4
PHP Bug Type: PostgreSQL related
Bug description: pg_escape_string removes some backslashes
Description:
------------
Some backslashes are lost after using that function, same bug seems to be
in mysqli_real_escape_string.
Another function (mysql_real_escape_string) does well, if this is not a
bug please give me a solution to fix this.
Thank you,
hajo @ bxcp.com
Reproduce code:
---------------
$var = '\ \\ \\\';
$test = pg_escape_string($var);
echo $test;
Expected result:
----------------
'\ \\ \\\'
Actual result:
--------------
' \ \\'
--
Edit bug report at http://bugs.php.net/?id=32750&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32750&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32750&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32750&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32750&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32750&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32750&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32750&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32750&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32750&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32750&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32750&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32750&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32750&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32750&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32750&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32750&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32750&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32750&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32750&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32750&r=mysqlcfg