Changeset 2071

Show
Ignore:
Timestamp:
02/18/08 01:18:58 (5 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:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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