Re: set_magic_quotes_runtime is still E_DEPRECATED
| From: | Keisial | Date: | Tue, 16 Jun 2009 11:36:26 +0000 |
| Subject: | Re: set_magic_quotes_runtime is still E_DEPRECATED | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44304@lists.php.net to get a copy of this message | ||
Pierre Joye wrote:
> On Tue, Jun 16, 2009 at 12:33 PM, Hannes
> Magnusson<hannes.magnusson@gmail.com> wrote:
>
>>> Because in PHP 6 (or next) the function "set_magic_quotes_runtime()" will be
>>> removed, so calling it without checking ini_get() will trigger a fatal
>>> error, no ?
>>>
>> And there is the problem.
>> The recommended way is:
>> if(get_magic_quotes_runtime()) {
>> set_magic_quotes_runtime(false);
>> }
>>
>> So, if MQ runtime is enabled - even "Doing The Right Thing" (turning
>> it off) will throw deprecated warnings.
>>
>
> And as get_magic_quotes_runtime() always returns FALSE,
> set_magic_quotes_runtime(false) will never be called.
>
> Cheers,
>
Hannes refers to 5.3. It will work on PHP 6, but on 5.3 it will throw a
the warning despite you doing
the right thing.
I propose the following behavior: "Throw a deprecated warning unless
magic quotes are currently enabled and the
parameter is to disable them".