Changeset 2382

Show
Ignore:
Timestamp:
03/30/08 00:55:58 (3 months ago)
Author:
Shadowhand
Message:

Fixing a bug in Validation that would prevent a callback from being used as a filter.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/system/libraries/Validation.php

    r2360 r2382  
    138138        public function pre_filter($filter, $field = TRUE) 
    139139        { 
    140                 if (method_exists($this, $filter)) 
     140                if (is_string($filter) AND method_exists($this, $filter)) 
    141141                { 
    142142                        // Make the filter a valid callback 
     
    180180        public function post_filter($filter, $field = TRUE) 
    181181        { 
    182                 if (method_exists($this, $filter)) 
     182                if (is_string($filter) AND method_exists($this, $filter)) 
    183183                { 
    184184                        // Make the filter a valid callback