title: PHP filter_input_array with FILTER_SANITIZE_STRING allows empty string
body: <p>I'm using the <code>filter_input_array</code> function to clean <code>$_POST</code> vars submitted from an HTML form.</p>
  
  <p>The problem is that in certain cases I am using the <code>FILTER_SANITIZE_STRING</code> flag and it allows an empty string i.e. <code>$value = ''</code>, but if that form field was left empty, in some cases, it needs to be left as <code>NULL</code>.</p>
  
  <p>The problem occurs when the database query fails due to a foreign key check failing, this happens because the field was submitted as an empty string instead of <code>NULL</code>.</p>
  
  <p>So before I go out rewriting a tonne of queries to make an empty-string check, could anyone tell me how I can configure this <code>filter_input_array</code> input array so that this input string is sanitized and yet either some text value or <code>NULL</code>, but not <code>''</code>.</p>
  
  <p>Thanks.</p>