Development

Changeset 1371

You must first sign up to be able to contribute.

Changeset 1371

Show
Ignore:
Timestamp:
05/18/06 15:17:52 (3 years ago)
Author:
fabien
Message:

added array support for validator declaration in validate.yml files

Files:

Legend:

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

    r1239 r1371  
    392392    $entry['validators'] = array(); 
    393393 
    394     if (trim($list) == ''
     394    if (!$list || (!is_array($list) && trim($list) == '')
    395395    { 
    396396      // skip the empty list 
     
    399399 
    400400    // get our validator array 
    401     $array = explode(',', $list); 
     401    $array = is_array($list) ? $list : explode(',', $list); 
    402402 
    403403    foreach ($array as $validator) 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.