Development

Changeset 6990

You must first sign up to be able to contribute.

Changeset 6990

Show
Ignore:
Timestamp:
01/07/08 21:21:14 (9 months ago)
Author:
fabien
Message:

forced form tainted values and tainted files to be arrays

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/form/sfForm.class.php

    r6969 r6990  
    114114   * @param array An array of uploaded files (in the $_FILES or $_GET format) 
    115115   */ 
    116   public function bind($taintedValues, $taintedFiles = array()) 
     116  public function bind(array $taintedValues = null, array $taintedFiles = array()) 
    117117  { 
    118118    $this->taintedValues = $taintedValues; 
     
    120120    $this->isBound = true; 
    121121    $this->resetFormFields(); 
     122 
     123    if (is_null($this->taintedValues)) 
     124    { 
     125      $this->taintedValues = array(); 
     126    } 
    122127 
    123128    try 
     
    650655   * @return array An array of re-ordered uploaded file information 
    651656   */ 
    652   static public function convertFileInformation($taintedFiles) 
     657  static public function convertFileInformation(array $taintedFiles) 
    653658  { 
    654659    return self::pathsToArray(preg_replace('#^(/[^/]+)?(/name|/type|/tmp_name|/error|/size)([^\s]*)( = [^\n]*)#m', '$1$3$2$4', self::arrayToPaths($taintedFiles)));