note 96736 added to function.filter-input-array

From: Date: Sat, 13 Mar 2010 11:18:08 +0000
Subject: note 96736 added to function.filter-input-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-166996@lists.php.net to get a copy of this message
While filtering input arrays, be careful of what flags you set besides FILTER_REQUIRE_ARRAY. For example, setting the flags like so: $filter = array( 'myInputArr' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => array('FILTER_FLAG_STRIP_LOW', 'FILTER_REQUIRE_ARRAY')) ); $form_inputs = filter_input_array(INPUT_POST, $filter); .. will result in a blank $form_inputs['myInputArr'] regardless of what $_POST['myInputArr'] contains. ---- Server IP: 69.147.83.197 Probable Submitter: 76.185.149.64 ---- Manual Page -- http://www.php.net/manual/en/function.filter-input-array.php Edit -- https://master.php.net/note/edit/96736 Del: integrated -- https://master.php.net/note/delete/96736/integrated Del: useless -- https://master.php.net/note/delete/96736/useless Del: bad code -- https://master.php.net/note/delete/96736/bad+code Del: spam -- https://master.php.net/note/delete/96736/spam Del: non-english -- https://master.php.net/note/delete/96736/non-english Del: in docs -- https://master.php.net/note/delete/96736/in+docs Del: other reasons-- https://master.php.net/note/delete/96736 Reject -- https://master.php.net/note/reject/96736 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166996) next »