Show
Ignore:
Timestamp:
02/18/2008 12:18:58 AM (11 months ago)
Author:
armen
Message:

empty() does not work correctly with ArrayObject? when using ARRAY_AS_PROPS, http://bugs.php.net/bug.php?id=40036

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Validation.php

    r2070 r2071  
    353353 
    354354                                                // Don't process rules on empty fields 
    355                                                 if (($func[1] !== 'required' AND $func[1] !== 'matches') AND empty($this[$f])) 
     355                                                if (($func[1] !== 'required' AND $func[1] !== 'matches') AND $this[$f] == NULL) 
    356356                                                        continue; 
    357357 
     
    369369 
    370370                                        // Don't process rules on empty fields 
    371                                         if (($func[1] !== 'required' AND $func[1] !== 'matches') AND empty($this[$field])) 
     371                                        if (($func[1] !== 'required' AND $func[1] !== 'matches') AND $this[$field] == NULL) 
    372372                                                continue; 
    373373