Development

Changeset 6991

You must first sign up to be able to contribute.

Changeset 6991

Show
Ignore:
Timestamp:
01/07/08 22:00:37 (9 months ago)
Author:
fabien
Message:

fixed schema validator when you have a field named 0 (because in PHP 0 == 'a string' returns true)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/validator/sfValidatorSchema.class.php

    r6954 r6991  
    141141      } 
    142142 
    143       unset($unused[array_search($name, $unused)]); 
     143      unset($unused[array_search($name, $unused, true)]); 
    144144 
    145145      // validate value 
     
    166166      catch (sfValidatorError $e) 
    167167      { 
     168        $clean[$name] = null; 
     169 
    168170        $errorSchema->addError($e, (string) $name); 
    169171      }