note 79664 added to security.magicquotes.whynot

From: Date: Fri, 07 Dec 2007 04:45:08 +0000
Subject: note 79664 added to security.magicquotes.whynot
Groups: php.notes 
Request: Send a blank email to php-notes+get-132918@lists.php.net to get a copy of this message
I find it useful to define a simple utility function for magic quotes so the application functions as expected regardless of whether magic_quotes_gpc is on: function strip_magic_slashes($str) { return get_magic_quotes_gpc() ? stripslashes($str) : $str; } Which can be annoying to add the first time you reference every $_GET /$_POST/$_COOKIE variable, but it prevents you from demanding your users to change their configurations. ---- Server IP: 69.147.83.197 Probable Submitter: 69.181.150.105 ---- Manual Page -- http://www.php.net/manual/en/security.magicquotes.whynot.php Edit -- https://master.php.net/note/edit/79664 Del: integrated -- https://master.php.net/note/delete/79664/integrated Del: useless -- https://master.php.net/note/delete/79664/useless Del: bad code -- https://master.php.net/note/delete/79664/bad+code Del: spam -- https://master.php.net/note/delete/79664/spam Del: non-english -- https://master.php.net/note/delete/79664/non-english Del: in docs -- https://master.php.net/note/delete/79664/in+docs Del: other reasons-- https://master.php.net/note/delete/79664 Reject -- https://master.php.net/note/reject/79664 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132918) next »