#42262 [Bgs->Opn]: get_magic_quotes_gpc() should be there and return false

From: Date: Mon, 04 Feb 2008 13:27:38 +0000
Subject: #42262 [Bgs->Opn]: get_magic_quotes_gpc() should be there and return false
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121945@lists.php.net to get a copy of this message
ID: 42262 Updated by: msaraujo@php.net Reported By: spam2 at rhsoft dot net -Status: Bogus +Status: Open Bug Type: Feature/Change Request Operating System: All PHP Version: 6CVS-2007-08-09 (snap) Previous Comments: ------------------------------------------------------------------------ [2008-02-04 13:17:35] msaraujo@php.net Hello, The behavior of get_magic_quotes_gpc has changed. Check the NEWS file: "Changed get_magic_quotes_gpc(), get_magic_quotes_runtime to always return false and set_magic_quotes_runtime() to raise an E_CORE_ERROR." ------------------------------------------------------------------------ [2007-08-09 22:39:12] spam2 at rhsoft dot net Description: ------------ [10-Aug-2007 00:30:56] PHP Fatal error: Call to undefined function get_magic_quotes_gpc() in /mnt/data/www/sql.rhsoft.net/libraries/common.lib.php on line 2606 The function "get_magic_quotes_gpc()" should available in PHP6 and return always false, so you dont break applications that check the setting and make a "stripslashes" if it is on. Reproduce code: --------------- if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { @$akt_temp_str_name = stripslashes(@$akt_temp_str_name); } Expected result: ---------------- if(get_magic_quotes_gpc()) { @$akt_temp_str_name = stripslashes(@$akt_temp_str_name); } should work also Actual result: -------------- A fatal error ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42262&edit=1

« previous php.bugs (#121945) next »