Re: magic quotes finale

From: Date: Sat, 24 May 2008 02:03:22 +0000
Subject: Re: magic quotes finale
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-37844@lists.php.net to get a copy of this message
Gregory Beaver wrote:
Rasmus Lerdorf wrote:
I see absolutely no reason to force people to go through and change: if(!get_magic_quotes_gpc()) to: if (!function_exists('get_magic_quotes_gpc') || !get_magic_quotes_gpc()) when there is no technical reason to force them to do so. It is slower, more verbose and completely useless.
I whole-heartedly agree. To the others: please examine this from a practical instead of a philosophical position. What is the problem that needs solving? * magic_quotes_gpc escapes input, which is bad. How to fix it? * disable magic_quotes_gpc = on, disable set_magic_quotes_gpc(1) Implicit in this statement is that the problem is *not*: * Users use get_magic_quotes_gpc() check whether this faulty ini is enabled, and set_magic_quotes_gpc(off) only if it is enabled. If we take the step of removing the get_magic_quotes_gpc() function, or of adding an E_DEPRECATED, we make upgrading to PHP 5.3 harder, for no benefit.
Right, I guess I wasn't absolutely explicit. There is no point in spewing an E_DEPRECATED on get_magic_quotes_gpc(). Such warnings should be for people actually using a deprecated feature, not for functions that check for those features. -Rasmus

« previous php.internals (#37844) next »