#43732 [Opn->Bgs]: Implement dummy get / set_magic_quotes_runtime for compatibility
| From: | johannes@php.net | Date: | Wed, 02 Jan 2008 23:23:36 +0000 |
| Subject: | #43732 [Opn->Bgs]: Implement dummy get / set_magic_quotes_runtime for compatibility | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120997@lists.php.net to get a copy of this message | ||
ID: 43732
Updated by: johannes@php.net
Reported By: samuel at slbdata dot se
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
PHP Version: 6CVS-2008-01-02 (snap)
New Comment:
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
That's intentional that way, this way we can make sure people see this
change and update their application. For compatibility you can use
something like
if (!function_exists('get_magic_quotes')) {
function get_magic_quotes() {
return false;
}
}
Previous Comments:
------------------------------------------------------------------------
[2008-01-02 22:55:12] samuel at slbdata dot se
Description:
------------
In PHP 6 magic_quotes has been removed completely, but many scripts use
get/set_magic_quotes_runtime to DISABLE it. These scripts break with
PHP 6, even though they do not use magic_quotes.
Reproduce code:
---------------
<?php
$old = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);
// Do something here
set_magic_quotes_runtime($old);
Expected result:
----------------
Because the script tried to disable magic_quotes, it should work. I
suggest that the behavior in PHP 6 is changed to:
get_magic_quotes_runtime() // always returns 0
set_magic_quotes_runtime(0) // does nothing
set_magic_quotes_runtime(1) // fatal error
(0 and 1 could of course be replaced with anything that is equal to
FALSE or TRUE, respectively)
Actual result:
--------------
With php6.0-200801022130 I get:
PHP Fatal error: Call to undefined function get_magic_quotes_runtime()
in - on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43732&edit=1