php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48990 get_magic_quotes_gpc returns true (int 1)
Submitted: 2009-07-20 19:39 UTC Modified: 2009-07-21 10:09 UTC
From: troelskn at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.0 OS: linux
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: troelskn at gmail dot com
New email:
PHP Version: OS:

 

 [2009-07-20 19:39 UTC] troelskn at gmail dot com
Description:
------------
magic quotes has been deprecated from 5.3
If there is no configuration setting for magic_quotes, the function get_magic_quotes_gpc will return true (int 1). This leads some scripts to believe that magic quotes is on, while they are not.

Reproduce code:
---------------
$ php --version
PHP 5.3.0 (cli) (built: Jul 19 2009 02:23:09) 
Copyright (c) 1997-2009 The PHP Group
$ php -r 'var_dump(get_magic_quotes_gpc());'
int(1)
$ php -r 'var_dump(get_magic_quotes_runtime());'
int(0)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-21 10:09 UTC] troelskn at gmail dot com
Not sure what is going on here, but I've gotten my hands on another build of 5.3 and it doesn't exhibit this behaviour. In any case, I have confused the meaning of magic_quotes_runtime. I'm closing this until I can figure out why I was getting deprecated warnings on my own build of php.)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 06:01:31 2024 UTC