Development

Changeset 8754

You must first sign up to be able to contribute.

Changeset 8754

Show
Ignore:
Timestamp:
05/03/08 20:32:36 (4 months ago)
Author:
FabianLange
Message:

validation yml with fillin is used even without other validators defined in the file. fixed #3232

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/config/sfValidatorConfigHandler.class.php

    r7791 r8754  
    4646      if (!isset($config[$category])) 
    4747      { 
    48         throw new sfParseException(sprintf('Configuration file "%s" is missing "%s" category', $configFiles[0], $category)); 
     48        if (!isset($config['fillin'])) 
     49        { 
     50          throw new sfParseException(sprintf('Configuration file "%s" is missing "%s" category', $configFiles[0], $category)); 
     51        } 
     52        $config[$category] = array(); 
    4953      } 
    5054    } 
     
    98102    $data[] = "{"; 
    99103 
    100     $ret = $this->generateRegistration('GET', $data, $methods, $names, $validators); 
    101  
    102     if ($ret
     104    $this->generateRegistration('GET', $data, $methods, $names, $validators); 
     105 
     106    if (count($fillin)
    103107    { 
    104108      $data[] = sprintf("  \$context->getRequest()->setAttribute('fillin', %s, 'symfony/filter');", $fillin); 
     
    111115    $data[] = "{"; 
    112116 
    113     $ret = $this->generateRegistration('POST', $data, $methods, $names, $validators); 
    114  
    115     if ($ret
     117    $this->generateRegistration('POST', $data, $methods, $names, $validators); 
     118 
     119    if (count($fillin)
    116120    { 
    117121      $data[] = sprintf("  \$context->getRequest()->setAttribute('fillin', %s, 'symfony/filter');", $fillin);