note 66329 added to function.get-magic-quotes-gpc

From: Date: Fri, 19 May 2006 08:25:58 +0000
Subject: note 66329 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-111665@lists.php.net to get a copy of this message
Hello firends This is that code posted by millerrd at gmail dot com: if(!get_magic_quotes_gpc()){ function deepslash($v){ return (is_array($v)) ? array_map("deepslash", $v) : addslashes($v); } $_POST=array_map("deepslash", $_POST); $_GET=array_map("deepslash", $_GET); $_COOKIE=array_map("deepslash", $_COOKIE); $_REQUEST=array_map("deepslash", $_REQUEST); $_GLOBALS=array_map("deepslash", $_GLOBALS); $_SERVER=array_map("deepslash", $_SERVER); } As far As I know We have not a superglobal array in PHP $_GLOBLAS, The correct code is: $GLOBALS=array_map("deepslash", $GLOBALS); Hossein, GOOD LUCK ---- Server IP: 66.163.161.117 Probable Submitter: 213.207.243.195 ---- X-Spam-Status: No, hits=3.8 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, UPPERCASE_25_50 autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Edit -- http://master.php.net/note/edit/66329 Del: integrated -- http://master.php.net/note/delete/66329/integrated Del: useless -- http://master.php.net/note/delete/66329/useless Del: bad code -- http://master.php.net/note/delete/66329/bad+code Del: spam -- http://master.php.net/note/delete/66329/spam Del: non-english -- http://master.php.net/note/delete/66329/non-english Del: in docs -- http://master.php.net/note/delete/66329/in+docs Del: other reasons-- http://master.php.net/note/delete/66329 Reject -- http://master.php.net/note/reject/66329 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111665) next »