php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41206 get_magic_quotes_gpc() not working
Submitted: 2007-04-26 17:43 UTC Modified: 2007-04-26 18:02 UTC
From: rayge99 at hotmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.4.6 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rayge99 at hotmail dot com
New email:
PHP Version: OS:

 

 [2007-04-26 17:43 UTC] rayge99 at hotmail dot com
Description:
------------
With get_magic_quotes_gpc() on it acts as if its still off as far as actual functionality goes.

If i use the code
if (!get_magic_quotes_gpc()) {
 $theValue = addslashes($theValue);
}

It will obviously skip it expecting magic quotes to take over but in FACT it isnt escaping anything. 



Reproduce code:
---------------
$value = "test's"
if (!get_magic_quotes_gpc()) {
 $theValue = addslashes($theValue);
}
$query = "INSERT INTO table
set field = "'".$value."'";


Expected result:
----------------
test's shoudl become test\'s

Actual result:
--------------
test's becomes test's

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-26 18:02 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC