php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24290 stripslashes() Problem with single quotes
Submitted: 2003-06-22 16:08 UTC Modified: 2003-06-23 06:40 UTC
From: borgiel at nevarsa dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.3.3RC1 OS: W2k
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: borgiel at nevarsa dot com
New email:
PHP Version: OS:

 

 [2003-06-22 16:08 UTC] borgiel at nevarsa dot com
Description:
------------
php.ini: (standard (dist) with this modifications)

register_globals = On

magic_quotes_gpc = 0n
magic_quotes_runtime = 0n
magic_quotes_sybase = 0n

If I use the stripslashes() function on '' i wil get only one ' back. I think this is not correct. If i have some text between the single quotes ('test'). The function works fine.
I found this Bug in version 4.3.2 and it is in version 4.3.3RC1, too.

There is a same bug in the system, but it is closed!!!
Bug #15824
It says:
Set magic_quotes_sybase = Off and the function works.
And it should be fixed in CVS, but it was last year. Why isn't it in version 4.3.2 and 4.3.3RC1 ?



Reproduce code:
---------------
<?

$string = "Hello '' Test";

echo stripslashes($string);

?>

Expected result:
----------------
Hello '' Test";

Actual result:
--------------
Hello ' Test

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-23 06:40 UTC] momo@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

u may choose to ini_set(\"magic_quotes_sybase\",0) before using the *slashes functions to bypass the problem. this behaior if well documented on the online manual comments.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 09:01:24 2019 UTC