Hi Mathew,

Perhaps it is the default HtmlEntities output filter that is causing your issue.
If so, then the following should show the expected integer value.

var_dump ($input->getUnescaped('field'));

Hope this helps.

Best regards,
Eric

----- Original Message ----- 
  From: Mathew Byrne 
  To: [email protected] 
  Sent: Monday, October 22, 2007 6:31 AM
  Subject: [fw-general] Zend_Filter_Input converting to String


  Why is it that Zend_Filter_Input appears to convert items that have been 
filtered to Int values back into a String?


  For instance:


  $filters = array ('field' => 'Int');
  $validators = array ('field' => 'Digits');
  $data = array ('field' => '1234');


  $input = new Zend_Filter_Input ($filters, $validators, $data);


  var_dump ($input->field);


  The following gives:


  string(4) "1234"


  Is this by design or am I missing something along the line somewhere?


  --
  Mathew Byrne, Lead Developer
  JB Interactive Pty. Ltd.
  222 Latrobe Street, Melbourne Victoria 3000


  1300 724 144
  www.jbinteractive.com.au



Reply via email to